Skip to content

Commit 5260bbb

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 cf47948 commit 5260bbb

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
@@ -423,6 +423,10 @@ function _addLiveReload(
423423
if (clientAddress.pathname) {
424424
clientAddress.pathname = path.posix.join(clientAddress.pathname, 'sockjs-node');
425425
sockjsPath = '&sockPath=' + clientAddress.pathname;
426+
// ensure webpack-dev-server uses the correct path to connect to the reloading socket
427+
if (webpackConfig.devServer) {
428+
webpackConfig.devServer.sockPath = clientAddress.pathname;
429+
}
426430
}
427431

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

0 commit comments

Comments
 (0)