-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.js
More file actions
65 lines (64 loc) · 1.9 KB
/
Copy pathvite.config.js
File metadata and controls
65 lines (64 loc) · 1.9 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
const { resolve } = require("path");
import vue from "@vitejs/plugin-vue";
import copy from "rollup-plugin-copy";
import { defineConfig } from "vite";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
"~": resolve(__dirname, "./node_modules/"),
core: resolve(__dirname, "../../themes/core/assets/js/"),
vue: "@vue/compat",
"@core-beta": resolve(__dirname, "../../themes/core-beta/assets/js")
}
},
build: {
manifest: "manifest.json",
outDir: "staticAssets",
rollupOptions: {
plugins: [
copy({
targets: [
// https://github.com/vitejs/vite/issues/1618#issuecomment-764579557
{
src: "./node_modules/@fortawesome/fontawesome-free/webfonts/**/*",
dest: "static/webfonts",
},
{
src: "./node_modules/@fontsource/lato/files/**/*400*-normal*",
dest: "static/webfonts"
},
{
src: "./node_modules/@fontsource/lato/files/**/*700*-normal*",
dest: "static/webfonts"
},
{
src: "./node_modules/@fontsource/raleway/files/**/*500*-normal*",
dest: "static/webfonts"
},
{
src: "./node_modules/@ctfdio/ctfd-js/assets/images/**",
dest: "static/img"
},
{
src: "./node_modules/@ctfdio/ctfd-js/assets/sounds/**",
dest: "static/sounds"
}
],
hook: "writeBundle"
})
],
output: {
manualChunks: {
echarts: ["echarts", "zrender"]
}
},
input: {
"js/config" : resolve(__dirname,"assets/js/config.js"),
"js/user" : resolve(__dirname,"assets/js/user.js"),
"js/users" : resolve(__dirname,"assets/js/users.js"),
}
}
}
});