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: {
|
|
|
|
|
rollupOptions: {
|
|
|
|
|
input: {
|
|
|
|
|
main: path.resolve(__dirname, "index.html"),
|
2026-06-20 22:15:59 +08:00
|
|
|
splash: path.resolve(__dirname, "splash.html"),
|
2026-07-12 01:24:31 +08:00
|
|
|
crash: path.resolve(__dirname, "crash.html"),
|
2026-06-19 23:50:40 +08:00
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
clearScreen: false,
|
|
|
|
|
server: {
|
|
|
|
|
port: 1420,
|
|
|
|
|
strictPort: true,
|
|
|
|
|
},
|
|
|
|
|
}));
|