-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvite.config.ts
44 lines (41 loc) · 927 Bytes
/
vite.config.ts
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
43
44
import { join, resolve } from "path"
import { defineConfig } from "vite"
import vue from "@vitejs/plugin-vue"
import WindiCSS from "vite-plugin-windicss"
import { VitePWA } from "vite-plugin-pwa"
import { createSvgIconsPlugin } from "vite-plugin-svg-icons"
const PACKAGE_ROOT = __dirname
export default defineConfig({
root: PACKAGE_ROOT,
plugins: [
vue(),
WindiCSS({
scan: {
fileExtensions: ["vue", "html", "ts"],
},
}),
createSvgIconsPlugin({
iconDirs: [resolve(process.cwd(), "src/assets/icons")],
symbolId: "icon-[dir]-[name]",
}),
VitePWA({
registerType: "autoUpdate",
}),
],
resolve: {
alias: {
"/@/": join(PACKAGE_ROOT, "src") + "/",
"/$/": join(PACKAGE_ROOT, "types") + "/",
},
},
server: {
fs: {
strict: true,
},
},
build: {
sourcemap: true,
emptyOutDir: true,
brotliSize: false,
},
})