Skip to content

Commit 411fe21

Browse files
clydinfilipesilva
authored andcommittedJul 20, 2020
fix(@angular-devkit/build-angular): avoid ES module assumption for vendor files
This change prevents import statements from being added to commonjs files when downleveling helpers are needed. These imports would then cause webpack to assume that the file is an ES module and potentially break the commonjs file. Fixes #18284
1 parent 67998b6 commit 411fe21

File tree

1 file changed

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

1 file changed

+1
-0
lines changed
 

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

+1
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,7 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration {
544544
cacheIdentifier: JSON.stringify({
545545
buildAngular: require('../../../../package.json').version,
546546
}),
547+
sourceType: 'unambiguous',
547548
presets: [
548549
[
549550
require.resolve('@babel/preset-env'),

0 commit comments

Comments
 (0)