Skip to content

Commit

Permalink
fix(preset-umi): wrong polyfill when user put .babelrc (#9901)
Browse files Browse the repository at this point in the history
* fix(preset-umi): wrong polyfill when user put .babelrc

* refactor(lint): also disable babel config for eslint parser
  • Loading branch information
PeachScript authored Dec 1, 2022
1 parent 167df36 commit 901aa3d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/lint/src/config/eslint/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ module.exports = {
jsx: true,
},
babelOptions: {
babelrc: false,
configFile: false,
presets: [require.resolve('@umijs/babel-preset-umi')],
},
requireConfigFile: false,
Expand Down
2 changes: 2 additions & 0 deletions packages/lint/src/config/eslint/legacy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ module.exports = {
jsx: true,
},
babelOptions: {
babelrc: false,
configFile: false,
presets: [require.resolve('@umijs/babel-preset-umi')],
},
requireConfigFile: false,
Expand Down
2 changes: 2 additions & 0 deletions packages/preset-umi/src/features/polyfill/polyfill.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ export {};
plugins: [
require.resolve('@umijs/babel-preset-umi/dist/plugins/lockCoreJS'),
],
babelrc: false,
configFile: false,
},
)!;
api.writeTmpFile({
Expand Down

0 comments on commit 901aa3d

Please sign in to comment.