-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathvite.renderer.config.mts
42 lines (41 loc) · 1.08 KB
/
vite.renderer.config.mts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import path from "path";
import VueRouter from "unplugin-vue-router/vite";
import vueDevTools from "vite-plugin-vue-devtools";
// https://vitejs.dev/config
export default defineConfig({
resolve: {
alias: {
"@main": path.join(__dirname, "src/main"),
"@renderer": path.join(__dirname, "src/renderer"),
"@preload": path.join(__dirname, "src/preload"),
$: path.join(__dirname, "vendor"),
},
},
build: {
sourcemap: true,
},
optimizeDeps: {
esbuildOptions: {
target: "esnext",
},
},
css: {
modules: false,
preprocessorOptions: {
scss: {
api: "modern-compiler",
additionalData: `@use "@renderer/styles/_utils.scss";`,
},
},
},
plugins: [
vueDevTools(),
VueRouter({
routesFolder: "src/renderer/views",
dts: "src/renderer/typed-router.d.ts",
}),
vue(),
],
});