-
Notifications
You must be signed in to change notification settings - Fork 17
/
vite.config.js
41 lines (39 loc) · 977 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
40
41
import { defineConfig } from "vite";
import { svelte } from "@sveltejs/vite-plugin-svelte";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [svelte()],
define: {
global: "window", // hack for dragula
},
build: {
rollupOptions: {
output: {
manualChunks(id) {
if (id.includes("firebase")) {
return "firebase";
}
if (id.includes("crypto-js")) {
return "crypto-js";
}
if (id.includes("moment")) {
return "moment";
}
if (id.includes("svelte-feather-icons")) {
return "icons";
}
},
},
},
},
server: {
proxy: {
// Cloud
"/boards": "https://retrotools-dev-7kiihsiuqq-nw.a.run.app",
"/auth": "https://retrotools-dev-7kiihsiuqq-nw.a.run.app",
// Local
// "/boards": "http://localhost:8000",
// "/auth": "http://localhost:8000",
},
},
});