617ca5ee8b
Set basename in router and base in vite config for production environment Update favicon and fix deploy workflow newline
16 lines
439 B
TypeScript
16 lines
439 B
TypeScript
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()],
|
|
base: process.env.NODE_ENV === 'production' ? '/react-template/' : '/',
|
|
resolve: {
|
|
alias: {
|
|
"@": fileURLToPath(new URL("./src", import.meta.url)),
|
|
},
|
|
},
|
|
})
|