-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathvite.demo.config.ts
39 lines (37 loc) · 925 Bytes
/
vite.demo.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
import { fileURLToPath, URL } from "node:url"
import { defineConfig } from "vite"
import vue from "@vitejs/plugin-vue"
// https://vitejs.dev/config/
export default defineConfig({
define: {
__VUE_PROD_DEVTOOLS__: true, // nice for demo mode
__DEBUBGBAR_MODE__: "web",
},
plugins: [
vue({
template: {
compilerOptions: {
// This is because I embed the ruby logo SVG as a vue component.
// There is probably a better way.
isCustomElement: (tag) => tag.includes(":"),
},
},
}),
],
resolve: {
alias: {
"@": fileURLToPath(new URL("./src", import.meta.url)),
},
},
build: {
manifest: true,
sourcemap: true, // very nice for demo mode
emptyOutDir: false,
outDir: "./dist-demo",
rollupOptions: {
input: {
debugbar: fileURLToPath(new URL("./src/demo.ts", import.meta.url)),
},
},
},
})