b90b253785
Add GitHub Actions workflow for automatic deployment to GitHub Pages. Includes build and deploy jobs with pnpm setup and caching. Also update package.json with deploy scripts and vite.config.ts with base URL configuration for production.
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)),
|
|
},
|
|
},
|
|
})
|