Skip to content

Commit de86f0a

Browse files
committed
fix live reload for webpack 5
1 parent 60eb00e commit de86f0a

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

packages/angular-v12/angular-v12.webpack.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@ export class AngularV12Webpack extends AngularWebpack {
7777
delete webpackConfig.devServer.watchOptions;
7878

7979
// Moved sockPath to client.webSocketURL.pathname option
80-
webpackConfig.devServer.client.webSocketURL = webpackConfig.devServer.client.webSocketURL || {};
81-
webpackConfig.devServer.client.webSocketURL.pathname = webpackConfig.devServer.sockPath;
80+
// We let webpack handle that now
8281
delete webpackConfig.devServer.sockPath;
8382

8483
// Removed stats in favor of the stats options from webpack

packages/angular-v12/webpack/webpack5.serve.config.ts

+2-7
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export function webpack5ServeConfigFactory(
9090
serveIndex: true,
9191
// Can be:
9292
// watch: {} (options for the `watch` option you can find https://github.com/paulmillr/chokidar)
93-
watch: true,
93+
watch: false,
9494
},
9595
],
9696

@@ -110,12 +110,7 @@ export function webpack5ServeConfigFactory(
110110
},
111111

112112
client: {
113-
overlay: false,
114-
// public, sockHost, sockPath, and sockPort options were removed in favor client.webSocketURL option:
115-
webSocketURL: {
116-
pathname: `_hmr/${devServerID}`,
117-
// port automatically matches the website
118-
},
113+
overlay: false
119114
},
120115

121116
webSocketServer: {

0 commit comments

Comments
 (0)