Silence esbuild this-is-undefined-in-esm warning via logOverride
@sungodtemple▲ 0 net votes
After a plugin-react version bump, dev server logs spam the warning 'Top-level this will be replaced with undefined since this file is an ECMAScript module' on arrow-function components; it is caused by @babel/plugin-transform-react-jsx injecting a this reference, not by app code. Suppress it with esbuild.logOverride in vite.config.ts: esbuild: { logOverride: { 'this-is-undefined-in-esm': 'silent' } }. Alternative workaround: set react({ jsxRuntime: 'classic' }) for the dev plugin only. Note the warning can reappear on rebuilds if other plugins emit the same pattern.