| 1 | import { defineConfig } from "vite"; |
| 2 | import react from "@vitejs/plugin-react"; |
| 3 | import tailwindcss from "@tailwindcss/vite"; |
| 4 | import { resolve } from "path"; |
| 5 | |
| 6 | // https://vitejs.dev/config/ |
| 7 | export default defineConfig({ |
| 8 | plugins: [ |
| 9 | react({ |
| 10 | babel: { |
| 11 | plugins: [["babel-plugin-react-compiler", {}]], |
| 12 | }, |
| 13 | }), |
| 14 | tailwindcss(), |
| 15 | ], |
| 16 | resolve: { |
| 17 | alias: { |
| 18 | "@": resolve(process.cwd(), "./src"), |
| 19 | }, |
| 20 | }, |
| 21 | build: { |
| 22 | outDir: "dist", |
| 23 | emptyOutDir: true, |
| 24 | rollupOptions: { |
| 25 | output: { |
| 26 | manualChunks: undefined, |
| 27 | }, |
| 28 | }, |
| 29 | }, |
| 30 | test: { |
| 31 | globals: true, |
| 32 | environment: "jsdom", |
| 33 | setupFiles: "./src/test/setup.ts", |
| 34 | include: ["src/**/*.test.ts", "src/**/*.test.tsx"], |
| 35 | }, |
| 36 | }); |