Skip to content

Commit d466ad0

Browse files
authored
fix: ignore babelrc in legacy plugin (#2801)
1 parent 11de3c2 commit d466ad0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/plugin-legacy/index.js

+2
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ function viteLegacyPlugin(options = {}) {
226226
// transform the legacy chunk with @babel/preset-env
227227
const sourceMaps = !!config.build.sourcemap
228228
const { code, map } = loadBabel().transform(raw, {
229+
babelrc: false,
229230
configFile: false,
230231
compact: true,
231232
sourceMaps,
@@ -408,6 +409,7 @@ function viteLegacyPlugin(options = {}) {
408409
function detectPolyfills(code, targets, list) {
409410
const { ast } = loadBabel().transform(code, {
410411
ast: true,
412+
babelrc: false,
411413
configFile: false,
412414
presets: [
413415
[

0 commit comments

Comments
 (0)