Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(webpack-dev-server): contentBasePublicPath from v3.10 #41962

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 8 additions & 1 deletion types/webpack-dev-server/index.d.ts
Original file line number Diff line number Diff line change
@@ -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 <https://github.com/maestroh>
// Dave Parslow <https://github.com/daveparslow>
Expand All @@ -9,6 +9,7 @@
// Katsuya Hino <https://github.com/dobogo>
// Billy Le <https://github.com/billy-le>
// Chris Paterson <https://github.com/chrispaterson>
// Piotr Błażejewicz <https://github.com/peterblazejewicz>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3

Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions types/webpack-dev-server/webpack-dev-server-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down