dev-server.ts (angular-cli-11.0.1) | : | dev-server.ts (angular-cli-11.0.2) | ||
---|---|---|---|---|
skipping to change at line 59 | skipping to change at line 59 | |||
// Resolve public host and client address. | // Resolve public host and client address. | |||
let publicHost = wco.buildOptions.publicHost; | let publicHost = wco.buildOptions.publicHost; | |||
if (publicHost) { | if (publicHost) { | |||
if (!/^\w+:\/\//.test(publicHost)) { | if (!/^\w+:\/\//.test(publicHost)) { | |||
publicHost = `${ssl ? 'https' : 'http'}://${publicHost}`; | publicHost = `${ssl ? 'https' : 'http'}://${publicHost}`; | |||
} | } | |||
const parsedHost = url.parse(publicHost); | const parsedHost = url.parse(publicHost); | |||
publicHost = parsedHost.host; | publicHost = parsedHost.host; | |||
} else { | ||||
publicHost = '0.0.0.0:0'; | ||||
} | } | |||
if (!watch) { | if (!watch) { | |||
// There's no option to turn off file watching in webpack-dev-server, but | // There's no option to turn off file watching in webpack-dev-server, but | |||
// we can override the file watcher instead. | // we can override the file watcher instead. | |||
extraPlugins.push({ | extraPlugins.push({ | |||
// tslint:disable-next-line:no-any | // tslint:disable-next-line:no-any | |||
apply: (compiler: any) => { | apply: (compiler: any) => { | |||
compiler.hooks.afterEnvironment.tap('angular-cli', () => { | compiler.hooks.afterEnvironment.tap('angular-cli', () => { | |||
compiler.watchFileSystem = { watch: () => { } }; | compiler.watchFileSystem = { watch: () => { } }; | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 2 lines changed or added |