Skip to content

Commit 2960a71

Browse files
alan-agius4mgechev
authored andcommitted
fix(@angular-devkit/build-angular): pass webpack factor to runWebpackDevServer
1 parent 453c5ad commit 2960a71

File tree

1 file changed

+9
-2
lines changed
  • packages/angular_devkit/build_angular/src/dev-server

1 file changed

+9
-2
lines changed

packages/angular_devkit/build_angular/src/dev-server/index.ts

+9-2
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,14 @@ export function serveWebpackBrowser(
277277
`);
278278
}
279279

280-
return runWebpackDevServer(webpackConfig, context, { logging: loggingFn }).pipe(
280+
return runWebpackDevServer(
281+
webpackConfig,
282+
context,
283+
{
284+
logging: loggingFn,
285+
webpackFactory: require('webpack') as typeof webpack,
286+
},
287+
).pipe(
281288
map(buildEvent => {
282289
// Resolve serve address.
283290
const serverAddress = url.format({
@@ -442,7 +449,7 @@ export function buildServerConfig(
442449
const servePath = buildServePath(serverOptions, browserOptions, logger);
443450
const { styles, scripts } = normalizeOptimization(browserOptions.optimization);
444451

445-
const config: WebpackDevServer.Configuration & { logLevel: string} = {
452+
const config: WebpackDevServer.Configuration & { logLevel: string } = {
446453
host: serverOptions.host,
447454
port: serverOptions.port,
448455
headers: { 'Access-Control-Allow-Origin': '*' },

0 commit comments

Comments
 (0)