2021-12-08 18:34:23 +03:00
|
|
|
import { defineConfig } from "vite";
|
2022-08-05 21:35:11 +03:00
|
|
|
import path from "path";
|
2022-03-30 07:36:39 +03:00
|
|
|
import svgr from "vite-plugin-svgr";
|
2021-12-08 18:34:23 +03:00
|
|
|
import react from "@vitejs/plugin-react";
|
2022-03-26 19:58:17 +03:00
|
|
|
import monaco from "vite-plugin-monaco-editor";
|
2021-12-08 18:34:23 +03:00
|
|
|
|
|
|
|
// https://vitejs.dev/config/
|
|
|
|
export default defineConfig({
|
|
|
|
root: "src",
|
2022-09-01 20:35:06 +03:00
|
|
|
server: { port: 3000 },
|
2022-07-04 19:52:22 +03:00
|
|
|
plugins: [
|
|
|
|
svgr(),
|
|
|
|
react(),
|
|
|
|
monaco({ languageWorkers: ["editorWorkerService", "typescript"] }),
|
|
|
|
],
|
2021-12-11 19:39:28 +03:00
|
|
|
build: {
|
|
|
|
outDir: "../dist",
|
2021-12-21 20:15:04 +03:00
|
|
|
emptyOutDir: true,
|
2021-12-11 19:39:28 +03:00
|
|
|
},
|
2022-08-05 21:35:11 +03:00
|
|
|
resolve: {
|
|
|
|
alias: {
|
|
|
|
"@": path.resolve("./src"),
|
|
|
|
"@root": path.resolve("."),
|
|
|
|
},
|
|
|
|
},
|
2022-08-15 20:53:40 +03:00
|
|
|
define: {
|
|
|
|
WIN_PORTABLE: !!process.env.VITE_WIN_PORTABLE,
|
|
|
|
},
|
2021-12-08 18:34:23 +03:00
|
|
|
});
|