Skip to content

Commit 898a486

Browse files
clydinjosephperrott
authored andcommitted
fix(@angular-devkit/build-angular): always inject live reload client when using live reload
The current stable version of `webpack-dev-server` does not fully handle Webpack 5's configuration options. In this case, the `target` option can now be an array. However, the array form is ignored by the dev server which can cause the live reload client code to not be included in the output bundles. To remedy this, the `injectClient` option is used when live reload is enabled which forces the client code to be included regardless of the `target` option. (cherry picked from commit 85ce5ec)
1 parent ca5ceaa commit 898a486

File tree

1 file changed

+1
-0
lines changed
  • packages/angular_devkit/build_angular/src/webpack/configs

1 file changed

+1
-0
lines changed

packages/angular_devkit/build_angular/src/webpack/configs/dev-server.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ export function getDevServerConfig(
121121
inline: hmr,
122122
publicPath: servePath,
123123
liveReload,
124+
injectClient: liveReload,
124125
hotOnly: hmr && !liveReload,
125126
hot: hmr,
126127
proxy: addProxyConfig(root, proxyConfig),

0 commit comments

Comments
 (0)