Skip to content

Commit

Permalink
fix(@angular-devkit/build-angular): use query option to set sockJS pa…
Browse files Browse the repository at this point in the history
…th in dev-server

Fixes #15002
  • Loading branch information
clydin authored and Keen Yee Liau committed Jul 9, 2019
1 parent a033e50 commit c232e14
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/angular_devkit/build_angular/src/dev-server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -417,11 +417,13 @@ function _addLiveReload(

// If a custom path is provided the webpack dev server client drops the sockjs-node segment.
// This adds it back so that behavior is consistent when using a custom URL path
let sockjsPath = '';
if (clientAddress.pathname) {
clientAddress.pathname = path.posix.join(clientAddress.pathname, 'sockjs-node');
clientAddress.pathname = path.posix.join(clientAddress.pathname, 'sockjs-node');
sockjsPath = '&sockPath=' + clientAddress.pathname;
}

const entryPoints = [`${webpackDevServerPath}?${url.format(clientAddress)}`];
const entryPoints = [`${webpackDevServerPath}?${url.format(clientAddress)}${sockjsPath}`];
if (options.hmr) {
const webpackHmrLink = 'https://webpack.js.org/guides/hot-module-replacement';

Expand Down

0 comments on commit c232e14

Please sign in to comment.