Skip to content

Commit e93cf8b

Browse files
authored
chore: remove parser plugins included by default in Babel core (#135)
1 parent ef10925 commit e93cf8b

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

packages/plugin-react/src/index.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -252,17 +252,7 @@ export default function viteReact(opts: Options = {}): PluginOption[] {
252252
}
253253
}
254254

255-
const parserPlugins: typeof babelOptions.parserOpts.plugins = [
256-
...babelOptions.parserOpts.plugins,
257-
'importMeta',
258-
// This plugin is applied before esbuild transforms the code,
259-
// so we need to enable some stage 3 syntax that is supported in
260-
// TypeScript and some environments already.
261-
'topLevelAwait',
262-
'classProperties',
263-
'classPrivateProperties',
264-
'classPrivateMethods',
265-
]
255+
const parserPlugins = [...babelOptions.parserOpts.plugins]
266256

267257
if (!extension.endsWith('.ts')) {
268258
parserPlugins.push('jsx')

0 commit comments

Comments
 (0)