diff --git a/packages/playground/react/package.json b/packages/playground/react/package.json index 845ac6c8bbfed3..18a7edd74fa339 100644 --- a/packages/playground/react/package.json +++ b/packages/playground/react/package.json @@ -14,5 +14,10 @@ }, "devDependencies": { "@vitejs/plugin-react-refresh": "^1.3.1" + }, + "babel": { + "presets": [ + "@babel/preset-env" + ] } } diff --git a/packages/plugin-react-refresh/index.js b/packages/plugin-react-refresh/index.js index 0a5cc8056f915e..a68875e5df2b83 100644 --- a/packages/plugin-react-refresh/index.js +++ b/packages/plugin-react-refresh/index.js @@ -102,6 +102,7 @@ function reactRefreshPlugin(opts) { const isReasonReact = id.endsWith('.bs.js') const result = transformSync(code, { + babelrc: false, configFile: false, filename: id, parserOpts: { diff --git a/packages/plugin-vue-jsx/index.js b/packages/plugin-vue-jsx/index.js index 0f15b97fa35cbb..52a1e1a44020ca 100644 --- a/packages/plugin-vue-jsx/index.js +++ b/packages/plugin-vue-jsx/index.js @@ -82,6 +82,7 @@ function vueJsxPlugin(options = {}) { } const result = babel.transformSync(code, { + babelrc: false, ast: true, plugins, sourceMaps: needSourceMap,