mirror of
https://github.com/aiclientproxy/proxycast.git
synced 2026-10-24 12:04:22 +08:00
40 lines
855 B
TypeScript
40 lines
855 B
TypeScript
/// <reference types="vitest" />
|
|
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import svgr from "vite-plugin-svgr";
|
|
import path from "path";
|
|
|
|
export default defineConfig(({ mode }) => ({
|
|
plugins: [
|
|
react({
|
|
// 开发模式下启用 jsxDev 以获取组件源码位置
|
|
jsxRuntime: mode === "development" ? "automatic" : "automatic",
|
|
jsxImportSource: "react",
|
|
}),
|
|
svgr(),
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src"),
|
|
},
|
|
},
|
|
clearScreen: false,
|
|
server: {
|
|
port: 1420,
|
|
strictPort: false,
|
|
watch: {
|
|
ignored: ["**/src-tauri/**"],
|
|
},
|
|
},
|
|
test: {
|
|
globals: true,
|
|
environment: "jsdom",
|
|
exclude: [
|
|
"**/node_modules/**",
|
|
"**/dist/**",
|
|
"**/scripts/playwright-login/**",
|
|
"**/src-tauri/**",
|
|
],
|
|
},
|
|
}));
|