Skip to content

Commit 4c398dc

Browse files
authored
fix: update devServer config to use webSocketServer (#198)
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
1 parent 2a0f26c commit 4c398dc

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

config/webpack.dev-stage.config.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,7 @@ module.exports = merge(commonConfig, {
180180
// in the webpack development configuration. Note that only changes
181181
// to CSS are currently hot reloaded. JS changes will refresh the browser.
182182
hot: true,
183-
// Use 'ws' instead of 'sockjs-node' on server since we're using native
184-
// websockets in `webpackHotDevClient`.
185-
transportMode: 'ws',
183+
webSocketServer: 'ws',
186184
devMiddleware: {
187185
publicPath: PUBLIC_PATH,
188186
},

config/webpack.dev.config.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,7 @@ module.exports = merge(commonConfig, {
179179
// in the webpack development configuration. Note that only changes
180180
// to CSS are currently hot reloaded. JS changes will refresh the browser.
181181
hot: true,
182-
// Use 'ws' instead of 'sockjs-node' on server since we're using native
183-
// websockets in `webpackHotDevClient`.
184-
transportMode: 'ws',
182+
webSocketServer: 'ws',
185183
devMiddleware: {
186184
publicPath: PUBLIC_PATH,
187185
},

0 commit comments

Comments
 (0)