diff --git a/packages/angular-cli/models/webpack-build-test.js b/packages/angular-cli/models/webpack-build-test.js index e1d45510ec70..2aef8b397940 100644 --- a/packages/angular-cli/models/webpack-build-test.js +++ b/packages/angular-cli/models/webpack-build-test.js @@ -102,7 +102,11 @@ const getWebpackTestConfig = function (projectRoot, environment, appConfig) { resourcePath: `./${appConfig.root}` } } - }) + }), + new webpack.ContextReplacementPlugin( + /angular(\\|\/)core(\\|\/)(esm(\\|\/)src|src)(\\|\/)linker/, + appRoot + ) ], node: { fs: 'empty',