mirror of
https://github.com/dream-pep/koring-launcher.git
synced 2026-09-12 05:45:18 +08:00
43 lines
1.1 KiB
TypeScript
43 lines
1.1 KiB
TypeScript
import path from "path";
|
|
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import tailwindcss from "@tailwindcss/vite";
|
|
import pkg from "./package.json";
|
|
|
|
export default defineConfig(async () => ({
|
|
plugins: [react(), tailwindcss()],
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src"),
|
|
},
|
|
},
|
|
define: {
|
|
__APP_VERSION__: JSON.stringify(pkg.version),
|
|
},
|
|
base: "./",
|
|
build: {
|
|
chunkSizeWarningLimit: 1000,
|
|
rollupOptions: {
|
|
input: {
|
|
main: path.resolve(__dirname, "index.html"),
|
|
splash: path.resolve(__dirname, "splash.html"),
|
|
crash: path.resolve(__dirname, "crash.html"),
|
|
},
|
|
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"],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
clearScreen: false,
|
|
server: {
|
|
port: 1420,
|
|
strictPort: true,
|
|
},
|
|
}));
|