From 4be2137734f1870215c34c8e934964b03446eac2 Mon Sep 17 00:00:00 2001 From: Giorgio Aquino Date: Tue, 11 Feb 2020 08:50:10 +0100 Subject: [PATCH] docs(config): add contentBasePublicPath option (#3525) --- src/content/configuration/dev-server.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/content/configuration/dev-server.md b/src/content/configuration/dev-server.md index fe964c6dc9fb..ad65ecc1dc49 100644 --- a/src/content/configuration/dev-server.md +++ b/src/content/configuration/dev-server.md @@ -17,6 +17,7 @@ contributors: - bhavya9107 - wizardofhogwarts - jamesgeorge007 + - g100g --- [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 webpack-dev-server --content-base /path/to/content/dir ``` +## `devServer.contentBasePublicPath` + +`string` + +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` + +__webpack.config.js__ + +```javascript +module.exports = { + //... + devServer: { + contentBase: path.join(__dirname, 'assets'), + contentBasePublicPath: '/serve-content-base-at-this-url' + } +}; +``` ## `devServer.disableHostCheck`