-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.js
More file actions
36 lines (33 loc) · 849 Bytes
/
vite.config.js
File metadata and controls
36 lines (33 loc) · 849 Bytes
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
import path from "path";
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
const root = path.resolve(__dirname, "client");
export default defineConfig(({ mode }) => {
const isDev = mode === "development";
return {
root,
plugins: [vue()],
resolve: {
alias: {
vue: "vue/dist/vue.esm-browser.prod.js",
},
},
build: {
watch: isDev ? {} : undefined,
outDir: path.resolve("dist", "client"),
minify: !isDev,
emptyOutDir: !isDev,
rollupOptions: {
input: {
index: path.resolve(root, "index.html"),
preview: path.resolve(root, "preview.html"),
},
output: {
entryFileNames: "[name].js",
chunkFileNames: "[name].js",
assetFileNames: "[name].[ext]",
},
},
},
};
});