clash-verge-rev/vite.config.ts
2022-08-06 02:35:11 +08:00

26 lines
552 B
TypeScript

import { defineConfig } from "vite";
import path from "path";
import svgr from "vite-plugin-svgr";
import react from "@vitejs/plugin-react";
import monaco from "vite-plugin-monaco-editor";
// https://vitejs.dev/config/
export default defineConfig({
root: "src",
plugins: [
svgr(),
react(),
monaco({ languageWorkers: ["editorWorkerService", "typescript"] }),
],
build: {
outDir: "../dist",
emptyOutDir: true,
},
resolve: {
alias: {
"@": path.resolve("./src"),
"@root": path.resolve("."),
},
},
});