Skip to content

Commit 12402f5

Browse files
author
Andrew Luca
committed
docs(dev-server): add contentBasePublicPath option
1 parent ed0c76f commit 12402f5

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

src/content/configuration/dev-server.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,25 @@ webpack-dev-server --content-base /path/to/content/dir
276276
```
277277

278278

279+
## `devServer.contentBasePublicPath`
280+
281+
`string = '/'`
282+
283+
Tell the server at what URL to serve `devServer.contentBase`. If there was a file `assets/manifest.json`, it would be served at `/serve-content-base-at-this-url/manifest.json`
284+
285+
__webpack.config.js__
286+
287+
```javascript
288+
module.exports = {
289+
//...
290+
devServer: {
291+
contentBase: path.join(__dirname, 'assets'),
292+
contentBasePublicPath: '/serve-content-base-at-this-url'
293+
}
294+
};
295+
```
296+
297+
279298
## `devServer.disableHostCheck`
280299

281300
`boolean`
@@ -1132,7 +1151,7 @@ module.exports = {
11321151
The bundle will now be available as `http://localhost:8080/assets/bundle.js`.
11331152

11341153
T> Make sure `devServer.publicPath` always starts and ends with a forward slash.
1135-
1154+
11361155
It is also possible to use a full URL.
11371156

11381157
__webpack.config.js__

0 commit comments

Comments
 (0)