Skip to content

Commit

Permalink
fix: ignore babelrc in legacy plugin (#2801)
Browse files Browse the repository at this point in the history
  • Loading branch information
meteorlxy committed Mar 31, 2021
1 parent 11de3c2 commit d466ad0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/plugin-legacy/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ function viteLegacyPlugin(options = {}) {
// transform the legacy chunk with @babel/preset-env
const sourceMaps = !!config.build.sourcemap
const { code, map } = loadBabel().transform(raw, {
babelrc: false,
configFile: false,
compact: true,
sourceMaps,
Expand Down Expand Up @@ -408,6 +409,7 @@ function viteLegacyPlugin(options = {}) {
function detectPolyfills(code, targets, list) {
const { ast } = loadBabel().transform(code, {
ast: true,
babelrc: false,
configFile: false,
presets: [
[
Expand Down

0 comments on commit d466ad0

Please sign in to comment.