-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.js
More file actions
34 lines (33 loc) · 894 Bytes
/
vite.config.js
File metadata and controls
34 lines (33 loc) · 894 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
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import { resolve } from "path";
export default defineConfig({
root: "src/resources/src",
base: "/dist/", // public path for production
plugins: [vue()],
build: {
target: "esnext", //browsers can handle the latest ES features
outDir: "../dist",
emptyOutDir: true,
rollupOptions: {
input: [
resolve(__dirname, "src/resources/src/js/main.js"),
resolve(__dirname, "src/resources/src/js/index.js"),
resolve(__dirname, "src/resources/src/js/dashboard.js"),
resolve(__dirname, "src/resources/src/js/highlight.js"),
resolve(__dirname, "src/resources/src/css/guides.css"),
],
output: {
entryFileNames: "js/[name].js",
assetFileNames: "css/[name].[ext]",
},
},
},
server: {
origin: "http://localhost:3000",
hmr: {
protocol: "ws",
host: "localhost",
},
},
});