2025-03-26 19:06:46 +08:00
|
|
|
import { fileURLToPath, URL } from "node:url"
|
|
|
|
|
import { defineConfig } from "vite"
|
|
|
|
|
import react from "@vitejs/plugin-react"
|
|
|
|
|
import tailwindcss from "@tailwindcss/vite"
|
|
|
|
|
|
|
|
|
|
// https://vite.dev/config/
|
|
|
|
|
export default defineConfig({
|
|
|
|
|
plugins: [react(), tailwindcss()],
|
2025-09-15 20:25:29 +08:00
|
|
|
base: process.env.NODE_ENV === 'production' ? '/react-template/' : '/',
|
2025-03-26 19:06:46 +08:00
|
|
|
resolve: {
|
|
|
|
|
alias: {
|
|
|
|
|
"@": fileURLToPath(new URL("./src", import.meta.url)),
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
})
|