| 1 | import { defineConfig } from "vite"; |
| 2 | import react from "@vitejs/plugin-react"; |
| 3 | import tailwindcss from "@tailwindcss/vite"; |
| 4 | import path from "node:path"; |
| 5 | import { tanstackRouter } from "@tanstack/router-plugin/vite"; |
| 6 | |
| 7 | export default defineConfig({ |
| 8 | plugins: [ |
| 9 | // Please make sure that '@tanstack/router-plugin' is passed before '@vitejs/plugin-react' |
| 10 | tanstackRouter({ |
| 11 | target: "react", |
| 12 | autoCodeSplitting: true, |
| 13 | }), |
| 14 | react(), |
| 15 | tailwindcss(), |
| 16 | ], |
| 17 | resolve: { |
| 18 | alias: { |
| 19 | "@": path.resolve(__dirname, "./src"), |
| 20 | }, |
| 21 | }, |
| 22 | }); |