mirror of
https://github.com/mulgadc/spinifex.git
synced 2026-10-15 17:11:30 +00:00
fix: disable react compiler in tests for 20% speedup
This commit is contained in:
@@ -8,7 +8,7 @@ import basicSsl from "@vitejs/plugin-basic-ssl"
|
||||
import react, { reactCompilerPreset } from "@vitejs/plugin-react"
|
||||
import { defineConfig } from "vite"
|
||||
|
||||
export default defineConfig({
|
||||
export default defineConfig(({ mode }) => ({
|
||||
envDir: "../",
|
||||
build: {
|
||||
target: "es2023",
|
||||
@@ -29,9 +29,7 @@ export default defineConfig({
|
||||
routeFileIgnorePattern: "\\.test\\.(ts|tsx)$",
|
||||
}),
|
||||
react(),
|
||||
babel({
|
||||
presets: [reactCompilerPreset()],
|
||||
}),
|
||||
...(mode === "test" ? [] : [babel({ presets: [reactCompilerPreset()] })]),
|
||||
tailwindcss(),
|
||||
],
|
||||
resolve: {
|
||||
@@ -61,4 +59,4 @@ export default defineConfig({
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
}))
|
||||
|
||||
Reference in New Issue
Block a user