Skip to content

Commit e097c56

Browse files
micmrovikerman
authored andcommitted
fix(@angular-devkit/build-angular): sockPath for custom path
Set devServer.sockPath to connect to reloading socket via custom path when serving the app on a custom path.
1 parent 3a38d65 commit e097c56

File tree

1 file changed

+4
-0
lines changed
  • packages/angular_devkit/build_angular/src/dev-server

1 file changed

+4
-0
lines changed

packages/angular_devkit/build_angular/src/dev-server/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,10 @@ function _addLiveReload(
434434
if (clientAddress.pathname) {
435435
clientAddress.pathname = path.posix.join(clientAddress.pathname, 'sockjs-node');
436436
sockjsPath = '&sockPath=' + clientAddress.pathname;
437+
// ensure webpack-dev-server uses the correct path to connect to the reloading socket
438+
if (webpackConfig.devServer) {
439+
webpackConfig.devServer.sockPath = clientAddress.pathname;
440+
}
437441
}
438442

439443
const entryPoints = [`${webpackDevServerPath}?${url.format(clientAddress)}${sockjsPath}`];

0 commit comments

Comments
 (0)