mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2024-11-16 03:32:36 +08:00
38 lines
782 B
TypeScript
38 lines
782 B
TypeScript
import { defineConfig } from "vite";
|
|
import path from "path";
|
|
import svgr from "vite-plugin-svgr";
|
|
import react from "@vitejs/plugin-react";
|
|
import monacoEditor from "vite-plugin-monaco-editor";
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
root: "src",
|
|
server: { port: 3000 },
|
|
plugins: [
|
|
svgr(),
|
|
react(),
|
|
monacoEditor({
|
|
languageWorkers: ["editorWorkerService", "typescript"],
|
|
customWorkers: [
|
|
{
|
|
label: "yaml",
|
|
entry: "monaco-yaml/yaml.worker",
|
|
},
|
|
],
|
|
}),
|
|
],
|
|
build: {
|
|
outDir: "../dist",
|
|
emptyOutDir: true,
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve("./src"),
|
|
"@root": path.resolve("."),
|
|
},
|
|
},
|
|
define: {
|
|
OS_PLATFORM: `"${process.platform}"`,
|
|
},
|
|
});
|