Skip to content

Commit

Permalink
fix(@angular-devkit/build-angular): always inject live reload client …
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
clydin authored and josephperrott committed Apr 21, 2021
1 parent b8fc1dc commit 85ce5ec
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ export function getDevServerConfig(
inline: hmr,
publicPath: servePath,
liveReload,
injectClient: liveReload,
hotOnly: hmr && !liveReload,
hot: hmr,
proxy: addProxyConfig(root, proxyConfig),
Expand Down

0 comments on commit 85ce5ec

Please sign in to comment.