chore: update to react 19 and add react compiler

This commit is contained in:
2024-05-16 21:45:58 +02:00
parent 70227b3e46
commit 4c4a3a8fca
5 changed files with 1475 additions and 543 deletions

View File

@@ -3,9 +3,19 @@ import * as path from 'path'
import react from '@vitejs/plugin-react'
import { defineConfig } from 'vite'
const ReactCompilerConfig = {
/* ... */
}
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
plugins: [
react({
babel: {
plugins: [['babel-plugin-react-compiler', ReactCompilerConfig]],
},
}),
],
resolve: {
alias: [{ find: '@', replacement: path.resolve(__dirname, 'src') }],
},