Skip to content

Commit 4be2137

Browse files
authored
docs(config): add contentBasePublicPath option (#3525)
1 parent 1f96f6c commit 4be2137

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/content/configuration/dev-server.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ contributors:
1717
- bhavya9107
1818
- wizardofhogwarts
1919
- jamesgeorge007
20+
- g100g
2021
---
2122

2223
[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.
@@ -283,6 +284,23 @@ Usage via the CLI
283284
webpack-dev-server --content-base /path/to/content/dir
284285
```
285286

287+
## `devServer.contentBasePublicPath`
288+
289+
`string`
290+
291+
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/assets/manifest.json`
292+
293+
__webpack.config.js__
294+
295+
```javascript
296+
module.exports = {
297+
//...
298+
devServer: {
299+
contentBase: path.join(__dirname, 'assets'),
300+
contentBasePublicPath: '/serve-content-base-at-this-url'
301+
}
302+
};
303+
```
286304

287305
## `devServer.disableHostCheck`
288306

0 commit comments

Comments
 (0)