Skip to content

Commit 203f48a

Browse files
clydinkyliau
authored andcommitted
fix(@angular-devkit/build-angular): ensure babel configurations are isolated
The `configFile` option needs to be set to false to ensure Babel does not attempt to discover and load any file based configurations.
1 parent a9f1129 commit 203f48a

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,7 @@ async function setupLocalize(
366366
loader: require.resolve('babel-loader'),
367367
options: {
368368
babelrc: false,
369+
configFile: false,
369370
compact: false,
370371
cacheCompression: false,
371372
cacheDirectory: findCachePath('babel-loader'),

packages/angular_devkit/build_angular/src/utils/process-bundle.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ export async function process(options: ProcessBundleOptions): Promise<ProcessBun
125125
// tslint:disable-next-line: no-any
126126
inputSourceMap: false as any,
127127
babelrc: false,
128+
configFile: false,
128129
presets: [[
129130
require.resolve('@babel/preset-env'),
130131
{
@@ -613,6 +614,7 @@ function findLocalizePositions(
613614
try {
614615
ast = parseSync(options.code, {
615616
babelrc: false,
617+
configFile: false,
616618
sourceType: 'script',
617619
filename: options.filename,
618620
});

0 commit comments

Comments
 (0)