Skip to content

Commit f05d651

Browse files
dmohnsEugeneHlushko
authored andcommitted
docs(dev-server): Add documentation for mimeTypes option (#2933)
1 parent 0a2d65d commit f05d651

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/content/configuration/dev-server.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ contributors:
1111
- EugeneHlushko
1212
- Yiidiir
1313
- Loonride
14+
- dmohns
1415
---
1516

1617
[webpack-dev-server](https://github.com/webpack/webpack-dev-server) can be used to quickly develop an application. See the [development guide](/guides/development/) to get started.
@@ -658,6 +659,26 @@ T> [`watchOptions`](#devserver-watchoptions-) will have no effect when used with
658659
T> If you use the CLI, make sure __inline mode__ is disabled.
659660

660661

662+
## `devServer.mimeTypes` 🔑
663+
664+
`object`
665+
666+
Allows dev-server to register custom mime types.
667+
The object is passed to the underlying `webpack-dev-middleware`.
668+
See [documentation](https://github.com/webpack/webpack-dev-middleware#mimetypes) for usage notes.
669+
670+
__webpack.config.js__
671+
672+
```javascript
673+
module.exports = {
674+
//...
675+
devServer: {
676+
mimeTypes: { 'text/html': ['phtml'] }
677+
}
678+
};
679+
```
680+
681+
661682
## `devServer.noInfo` 🔑
662683

663684
`boolean`

0 commit comments

Comments
 (0)