Skip to content

Commit e649789

Browse files
committed
fix(@angular-devkit/build-angular): do not break with Jasmine's mock clock
Fixes #11164 Fixes #11626
1 parent fb864f8 commit e649789

File tree

1 file changed

+5
-1
lines changed
  • packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs

1 file changed

+5
-1
lines changed

packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,11 @@ export function getTestConfig(
7777
vendor: {
7878
name: 'vendor',
7979
chunks: 'initial',
80-
test: /[\\/]node_modules[\\/]/,
80+
test: (module: any, chunks: Array<{ name: string }>) => {
81+
const moduleName = module.nameForCondition ? module.nameForCondition() : '';
82+
return /[\\/]node_modules[\\/]/.test(moduleName)
83+
&& !chunks.some(({ name }) => name === 'polyfills');
84+
},
8185
},
8286
},
8387
},

0 commit comments

Comments
 (0)