chore: use proper name convention for build tools

This commit is contained in:
Rafael 2024-11-30 10:17:41 +00:00
parent 62f39f3561
commit d646aee24b
283 changed files with 353 additions and 422 deletions

View file

@ -19,28 +19,12 @@ export default defineConfig({
},
optimizeDeps: {
esbuildOptions: {
loader: {
'.js': 'jsx',
},
plugins: [
fixReactVirtualized,
],
}
},
plugins: [
{
name: 'treat-js-files-as-jsx',
async transform (code, id) {
if (!id.match(/src\/.*\.js$/)) return null
// Use the exposed transform from vite, instead of directly
// transforming with esbuild
return transformWithEsbuild(code, id, {
loader: 'jsx',
jsx: 'automatic',
})
},
},
react(),
svgr(),
],