-
-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(webpack-dev-server): Support only version 4 of webpack-dev-server
BREAKING CHANGE: webpack-dev-server version 4 is now required BREAKING CHANGE: The config layout is now the same as if webpack-dev-server is used without grunt BREAKING CHANGE: `port` and `static.directory` are not set by default anymore BREAKING CHANGE: the `keepalive` option does not exist anymore for the webpack-dev-server task
- Loading branch information
Showing
14 changed files
with
2,689 additions
and
2,688 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/options/__tests__/WebpackDevServerOptionHelper.test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import WebpackDevServerOptionHelper from "../WebpackDevServerOptionHelper"; | ||
|
||
describe("WebpackDevServerOptionHelper", () => { | ||
test("host is localhost by default", () => { | ||
const options = {}; | ||
const helper = new WebpackDevServerOptionHelper(); | ||
|
||
helper.getRawConfig = () => options; | ||
|
||
expect(helper.getWebpackOptions()).toMatchSnapshot(); | ||
expect(helper.getWebpackDevServerOptions()).toMatchSnapshot(); | ||
}); | ||
|
||
test("supports array config for webpack", () => { | ||
const options = [ | ||
{ devServer: { port: 8080 } }, | ||
{ devServer: { port: 9090 } }, | ||
]; | ||
const helper = new WebpackDevServerOptionHelper(); | ||
|
||
helper.getOptions = () => options; | ||
|
||
expect(helper.getWebpackOptions()).toMatchSnapshot(); | ||
expect(helper.getWebpackDevServerOptions()).toMatchSnapshot(); | ||
}); | ||
}); |
Oops, something went wrong.