forked from wrapper-offline/wrapper-offline
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.js
More file actions
37 lines (34 loc) · 938 Bytes
/
vite.config.js
File metadata and controls
37 lines (34 loc) · 938 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
37
import config from "./config.json" with {type:"json"};
import { defineConfig } from "vite";
import svgPlugin from "vite-svg-loader";
import vuePlugin from "@vitejs/plugin-vue";
process.env.VITE_API_SERVER_HOST = config.API_SERVER_HOST;
process.env.VITE_API_SERVER_PORT = config.API_SERVER_PORT;
process.env.VITE_STATIC_SERVER_HOST = config.STATIC_SERVER_HOST;
process.env.VITE_STATIC_SERVER_PORT = config.STATIC_SERVER_PORT;
process.env.VITE_SWF_URL = config.SWF_URL;
process.env.VITE_STORE_URL = config.STORE_URL;
process.env.VITE_CLIENT_URL = config.CLIENT_URL;
process.env.VITE_WRAPPER_VER = config.WRAPPER_VER;
export default defineConfig({
base: "",
esbuild: {
target: "es2020"
},
build: {
target: "es2020",
outDir: "./dist/renderer",
rollupOptions: {
input: ["./index.html"],
},
cssTarget: "chrome86",
},
keepProcessEnv: true,
plugins: [
vuePlugin(),
svgPlugin(),
],
server: {
port: 5173,
},
});