Skip to content

Commit 0890bed

Browse files
committed
docs(devServer): add type array for contentBasePublicPath option
1 parent 976d08b commit 0890bed

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

src/content/configuration/dev-server.md

+18-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ contributors:
1919
- jamesgeorge007
2020
- g100g
2121
- anikethsaha
22+
- snitin315
2223
---
2324

2425
[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.
@@ -292,7 +293,7 @@ webpack-dev-server --content-base /path/to/content/dir
292293

293294
## `devServer.contentBasePublicPath`
294295

295-
`string = '/'`
296+
`string = '/'` `[string]`
296297

297298
Tell the server at what URL to serve `devServer.contentBase` static content. If there was a file `assets/manifest.json`, it would be served at `/serve-content-base-at-this-url/manifest.json`
298299

@@ -310,6 +311,22 @@ module.exports = {
310311
};
311312
```
312313

314+
T> In case when you have several micro applications which all have custom static folders, you can pass an array of stings.
315+
316+
__webpack.config.js__
317+
318+
```javascript
319+
module.exports = {
320+
//...
321+
devServer: {
322+
contentBase: [contentBasePublic, contentBaseOther],
323+
contentBasePublicPath: [
324+
contentBasePublicPath,
325+
contentBasePublicOtherPath,
326+
]
327+
}
328+
};
329+
```
313330

314331
## `devServer.disableHostCheck`
315332

0 commit comments

Comments
 (0)