We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
this-is-undefined-in-esm
1 parent afe88ff commit f0aecbaCopy full SHA for f0aecba
packages/plugin-react/package.json
@@ -47,7 +47,7 @@
47
"react-refresh": "^0.13.0"
48
},
49
"peerDependencies": {
50
- "vite": "^3.0.0-alpha"
+ "vite": "^3.0.0-alpha.11"
51
52
"devDependencies": {
53
"vite": "workspace:*"
packages/plugin-react/src/index.ts
@@ -117,6 +117,17 @@ export default function viteReact(opts: Options = {}): PluginOption[] {
117
const viteBabel: Plugin = {
118
name: 'vite:react-babel',
119
enforce: 'pre',
120
+ config() {
121
+ if (opts.jsxRuntime === 'classic') {
122
+ return {
123
+ esbuild: {
124
+ logOverride: {
125
+ 'this-is-undefined-in-esm': 'silent'
126
+ }
127
128
129
130
+ },
131
configResolved(config) {
132
base = config.base
133
projectRoot = config.root
0 commit comments