Skip to content

Commit e17a2ed

Browse files
gkalpakfilipesilva
authored andcommitted
fix(@angular-devkit/build-angular): do not break with Jasmine's mock clock
Fixes #11164 Fixes #11626
1 parent ae3831b commit e17a2ed

File tree

1 file changed

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

1 file changed

+6
-1
lines changed

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

+6-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,12 @@ export function getTestConfig(
7777
vendor: {
7878
name: 'vendor',
7979
chunks: 'initial',
80-
test: /[\\/]node_modules[\\/]/,
80+
test: (module: { nameForCondition?: () => string }, chunks: { name: string }[]) => {
81+
const moduleName = module.nameForCondition ? module.nameForCondition() : '';
82+
83+
return /[\\/]node_modules[\\/]/.test(moduleName)
84+
&& !chunks.some(({ name }) => name === 'polyfills');
85+
},
8186
},
8287
},
8388
},

0 commit comments

Comments
 (0)