forked from evcc-io/evcc
-
Notifications
You must be signed in to change notification settings - Fork 2
/
vite.config.js
39 lines (38 loc) · 968 Bytes
/
vite.config.js
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 { defineConfig } from "vite";
import vuePlugin from "@vitejs/plugin-vue";
import { ViteToml } from "vite-plugin-toml";
import legacy from "@vitejs/plugin-legacy";
import { visualizer } from "rollup-plugin-visualizer";
export default defineConfig({
root: "./assets",
publicDir: "public",
base: "./",
build: {
outDir: "../dist/",
emptyOutDir: true,
assetsInlineLimit: 1024,
chunkSizeWarningLimit: 800, // legacy build increases file size
},
server: {
port: 7071,
proxy: {
"/api": "http://localhost:7070",
"/i18n": "http://localhost:7070",
"/ws": { target: "ws://localhost:7070", ws: true },
},
},
plugins: [
legacy({
targets: ["defaults", "iOS >= 14"],
}),
vuePlugin({
template: {
compilerOptions: {
isCustomElement: (tag) => tag.startsWith("shopicon-"),
},
},
}),
ViteToml(),
visualizer({ filename: "asset-stats.html" }),
],
});