diff --git a/types/webpack-dev-server/index.d.ts b/types/webpack-dev-server/index.d.ts index 74c9683f9fa2e3..b8e7bb22e30e09 100644 --- a/types/webpack-dev-server/index.d.ts +++ b/types/webpack-dev-server/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for webpack-dev-server 3.9 +// Type definitions for webpack-dev-server 3.10 // Project: https://github.com/webpack/webpack-dev-server // Definitions by: maestroh // Dave Parslow @@ -9,6 +9,7 @@ // Katsuya Hino // Billy Le // Chris Paterson +// Piotr Błażejewicz // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -76,6 +77,12 @@ declare namespace WebpackDevServer { * precedence. */ contentBase?: boolean | string | string[] | number; + /** + * 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` + */ + contentBasePublicPath?: string; /** * When set to true this option bypasses host checking. THIS IS NOT * RECOMMENDED as apps that do not check the host are vulnerable to DNS diff --git a/types/webpack-dev-server/webpack-dev-server-tests.ts b/types/webpack-dev-server/webpack-dev-server-tests.ts index 6f13a5323449fc..1a3c31fa58c81d 100644 --- a/types/webpack-dev-server/webpack-dev-server-tests.ts +++ b/types/webpack-dev-server/webpack-dev-server-tests.ts @@ -18,6 +18,7 @@ const config: WebpackDevServer.Configuration = { contentBase: "/path/to/directory", // or: contentBase: "http://localhost/", + contentBasePublicPath: "/serve-content-base-at-this-url", public: 'public-host.ru', // Public host for server