Skip to content

Commit 4c52dc2

Browse files
committed
fix(@angular-devkit/build-angular): don't add publicHost pathname to sockPath in dev-server
With this change we remove the unintentional breaking change that added publicHost pathname to sockPath instead we now prepend the sockPath with the servePath, which can be either the passed servePath option, baseHref or deployUrl. (cherry picked from commit f122b2f)
1 parent 71975af commit 4c52dc2

File tree

1 file changed

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

1 file changed

+1
-6
lines changed

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

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ export function getDevServerConfig(
4848
const extraPlugins = [];
4949

5050
// Resolve public host and client address.
51-
let sockPath: string | undefined;
5251
let publicHost = wco.buildOptions.publicHost;
5352
if (publicHost) {
5453
if (!/^\w+:\/\//.test(publicHost)) {
@@ -57,10 +56,6 @@ export function getDevServerConfig(
5756

5857
const parsedHost = url.parse(publicHost);
5958
publicHost = parsedHost.host;
60-
61-
if (parsedHost.pathname) {
62-
sockPath = posix.join(parsedHost.pathname, 'sockjs-node');
63-
}
6459
}
6560

6661
if (!watch) {
@@ -107,7 +102,7 @@ export function getDevServerConfig(
107102
},
108103
],
109104
},
110-
sockPath,
105+
sockPath: posix.join(servePath, 'sockjs-node'),
111106
stats: false,
112107
compress: stylesOptimization || scriptsOptimization,
113108
watchOptions: getWatchOptions(poll),

0 commit comments

Comments
 (0)