Set babelrc:false on config load for more consistent loading.

This commit is contained in:
Logan Smyth
2017-11-09 12:06:08 -08:00
parent 2bfa2eb5cd
commit 4a5d551370
2 changed files with 6 additions and 10 deletions

View File

@@ -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;