Files
nana-story/vite.config.ts
2026-07-28 12:51:00 +08:00

29 lines
722 B
TypeScript

import { fileURLToPath, URL } from "node:url";
import vue from "@vitejs/plugin-vue";
import { defineConfig } from "vitest/config";
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
"@": fileURLToPath(new URL("./src", import.meta.url)),
"@contracts": fileURLToPath(new URL("./contracts/ts", import.meta.url))
}
},
clearScreen: false,
server: {
strictPort: true,
port: 1420
},
envPrefix: ["VITE_", "TAURI_"],
build: {
target: process.env.TAURI_ENV_PLATFORM === "windows" ? "chrome105" : "safari13",
minify: process.env.TAURI_ENV_DEBUG ? false : "oxc",
sourcemap: Boolean(process.env.TAURI_ENV_DEBUG)
},
test: {
environment: "jsdom"
}
});