-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.js
42 lines (39 loc) · 1.13 KB
/
vite.config.js
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 { join } from "path";
import { defineConfig } from "vite";
import { fileURLToPath, URL } from "url";
import tailwindcss from "tailwindcss";
import autoprefixer from "autoprefixer";
import h12vite from "./plugin/h12.vite";
export default defineConfig({
root: join(__dirname, "/public"),
build: {
outDir: "../dist"
},
optimizeDeps: {
entries: [
'public/script/app.js',
]
},
plugins: [
h12vite()
],
resolve: {
alias: [
{ find: "@component", replacement: fileURLToPath(new URL("./public/script/component", import.meta.url)) },
{ find: "@library", replacement: fileURLToPath(new URL("./public/library", import.meta.url)) },
{ find: "@style", replacement: fileURLToPath(new URL("./public/style", import.meta.url)) },
{ find: "@data", replacement: fileURLToPath(new URL("./public/data", import.meta.url)) }
]
},
css: {
postcss: {
plugins: [
tailwindcss(),
autoprefixer()
],
},
},
esbuild: {
drop: ["debugger"]
}
})