forked from Linho1219/function-plot-GUI
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
68 lines (66 loc) · 1.52 KB
/
vite.config.ts
File metadata and controls
68 lines (66 loc) · 1.52 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
66
67
68
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import { resolve } from "node:path";
import { visualizer } from "rollup-plugin-visualizer";
import "dotenv/config";
// https://vite.dev/config/
export default defineConfig({
plugins: [
vue({
template: {
compilerOptions: {
isCustomElement: (tag) => tag.startsWith("s-"),
},
},
}),
visualizer({
gzipSize: true,
brotliSize: true,
emitFile: false,
filename: "chunk-analysis.html",
}),
],
build: {
chunkSizeWarningLimit: 1024,
rollupOptions: {
output: {
manualChunks: {
"function-plot": [
"function-plot",
"built-in-math-eval",
"d3-axis",
"d3-color",
"d3-format",
"d3-interpolate",
"d3-scale",
"d3-selection",
"d3-shape",
"d3-zoom",
"events",
"interval-arithmetic-eval",
],
prettier: [
"prettier",
"prettier/plugins/babel",
"prettier/plugins/estree",
],
vender: ["vue", "pinia", "vue-i18n", "vue-draggable-plus"],
},
},
},
},
resolve: {
alias: [
{
find: "@",
replacement: resolve(__dirname, "./src"),
},
],
},
esbuild: {
drop: process.env.NODE_ENV === "production" ? ["console", "debugger"] : [],
},
server: {
allowedHosts: [process.env.DEVHOST ?? "localhost"],
},
});