Skip to content

Commit 537e3a1

Browse files
alan-agius4clydin
authored andcommitted
refactor(@angular-devkit/build-webpack): port 0 WEBPACK_DEV_SERVER_BASE_PORT workaround
No longer needed due to change in webpack-dev-server. See: https://github.com/webpack/webpack-dev-server/blob/ed67f66fc41eb1dd83fb84ecaa18703559dbe2ae/lib/Server.js#L77-L79
1 parent 043c410 commit 537e3a1

File tree

1 file changed

+0
-7
lines changed
  • packages/angular_devkit/build_webpack/src/webpack-dev-server

1 file changed

+0
-7
lines changed

packages/angular_devkit/build_webpack/src/webpack-dev-server/index.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,6 @@ export function runWebpackDevServer(
5858
return new WebpackDevServer(config, webpack);
5959
};
6060

61-
// Force `WEBPACK_DEV_SERVER_BASE_PORT` to use port 0 as base port.
62-
// This is needed to handle better concurrent dev-servers. Otherwise if two or more processes starts at the same time
63-
// they will end up being assigned the same port due to a race condition between the time you get the port number and
64-
// you actually start using it.
65-
// https://github.com/webpack/webpack-dev-server/blob/2b1208dadfbe70246a36b74954e3f2fd2c3ba220/lib/Server.js#L76-L94
66-
process.env.WEBPACK_DEV_SERVER_BASE_PORT = '0';
67-
6861
const log: WebpackLoggingCallback =
6962
options.logging || ((stats, config) => context.logger.info(stats.toString(config.stats)));
7063

0 commit comments

Comments
 (0)