Files
koring-launcher/vite.config.ts
T

43 lines
1.1 KiB
TypeScript
Raw Normal View History

2026-06-19 23:50:40 +08:00
import path from "path";
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import tailwindcss from "@tailwindcss/vite";
2026-07-11 23:33:44 +08:00
import pkg from "./package.json";
2026-06-19 23:50:40 +08:00
export default defineConfig(async () => ({
plugins: [react(), tailwindcss()],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
2026-07-11 23:33:44 +08:00
define: {
__APP_VERSION__: JSON.stringify(pkg.version),
},
2026-06-28 03:37:07 +08:00
base: "./",
2026-06-19 23:50:40 +08:00
build: {
2026-07-23 01:29:55 +08:00
chunkSizeWarningLimit: 1000,
2026-06-19 23:50:40 +08:00
rollupOptions: {
input: {
main: path.resolve(__dirname, "index.html"),
2026-06-20 22:15:59 +08:00
splash: path.resolve(__dirname, "splash.html"),
crash: path.resolve(__dirname, "crash.html"),
2026-06-19 23:50:40 +08:00
},
2026-07-23 01:29:55 +08:00
output: {
manualChunks: {
"vendor-react": ["react", "react-dom"],
"vendor-motion": ["motion"],
"vendor-ui": ["lucide-react", "clsx", "tailwind-merge"],
"vendor-three": ["three", "@react-three/fiber"],
"vendor-zustand": ["zustand"],
},
},
2026-06-19 23:50:40 +08:00
},
},
clearScreen: false,
server: {
port: 1420,
strictPort: true,
},
}));