mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-03-29 23:29:10 +08:00
33 lines
647 B
TypeScript
33 lines
647 B
TypeScript
import path from "node:path";
|
|
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import { codeInspectorPlugin } from "code-inspector-plugin";
|
|
|
|
export default defineConfig(({ command }) => ({
|
|
root: "src",
|
|
plugins: [
|
|
command === "serve" &&
|
|
codeInspectorPlugin({
|
|
bundler: "vite",
|
|
}),
|
|
react(),
|
|
].filter(Boolean),
|
|
base: "./",
|
|
build: {
|
|
outDir: "../dist",
|
|
emptyOutDir: true,
|
|
},
|
|
server: {
|
|
port: 3000,
|
|
strictPort: true,
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src"),
|
|
},
|
|
},
|
|
clearScreen: false,
|
|
envPrefix: ["VITE_", "TAURI_"],
|
|
}));
|
|
|