Set babelrc:false on config load for more consistent loading.
This commit is contained in:
parent
2bfa2eb5cd
commit
4a5d551370
@ -120,6 +120,7 @@ class OptionManager {
|
||||
|
||||
// Tack the passes onto the object itself so that, if this object is passed back to Babel a second time,
|
||||
// it will be in the right structure to not change behavior.
|
||||
opts.babelrc = false;
|
||||
opts.plugins = this.passes[0];
|
||||
opts.presets = this.passes
|
||||
.slice(1)
|
||||
|
||||
@ -63,16 +63,11 @@ function compile(code, filename) {
|
||||
}
|
||||
}
|
||||
|
||||
const result = babel.transform(
|
||||
code,
|
||||
Object.assign(opts, {
|
||||
// Do not process config files since has already been done with the OptionManager
|
||||
// calls above and would introduce duplicates.
|
||||
babelrc: false,
|
||||
sourceMaps: opts.sourceMaps === undefined ? "both" : opts.sourceMaps,
|
||||
ast: false,
|
||||
}),
|
||||
);
|
||||
const result = babel.transform(code, {
|
||||
...opts,
|
||||
sourceMaps: opts.sourceMaps === undefined ? "both" : opts.sourceMaps,
|
||||
ast: false,
|
||||
});
|
||||
|
||||
if (cache) {
|
||||
cache[cacheKey] = result;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user