Skip to content

Commit

Permalink
fix: update devServer config to use webSocketServer (#198)
Browse files Browse the repository at this point in the history
v4 of webpack-dev-server has a breaking change where the 'transportMode' configuration for the dev server was changed to 'webSocketServer', effectively.

See migration guide here: https://github.com/webpack/webpack-dev-server/blob/master/migration-v4.md
  • Loading branch information
davidjoy authored Aug 20, 2021
1 parent 2a0f26c commit 4c398dc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions config/webpack.dev-stage.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,7 @@ module.exports = merge(commonConfig, {
// in the webpack development configuration. Note that only changes
// to CSS are currently hot reloaded. JS changes will refresh the browser.
hot: true,
// Use 'ws' instead of 'sockjs-node' on server since we're using native
// websockets in `webpackHotDevClient`.
transportMode: 'ws',
webSocketServer: 'ws',
devMiddleware: {
publicPath: PUBLIC_PATH,
},
Expand Down
4 changes: 1 addition & 3 deletions config/webpack.dev.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,7 @@ module.exports = merge(commonConfig, {
// in the webpack development configuration. Note that only changes
// to CSS are currently hot reloaded. JS changes will refresh the browser.
hot: true,
// Use 'ws' instead of 'sockjs-node' on server since we're using native
// websockets in `webpackHotDevClient`.
transportMode: 'ws',
webSocketServer: 'ws',
devMiddleware: {
publicPath: PUBLIC_PATH,
},
Expand Down

0 comments on commit 4c398dc

Please sign in to comment.