-
Notifications
You must be signed in to change notification settings - Fork 1
/
vite.config.ts
38 lines (35 loc) · 1.31 KB
/
vite.config.ts
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
import { defineConfig } from "vite";
// import mix from 'vite-plugin-mix'
// https://vitejs.dev/config/
export default defineConfig({
build: {
target: "es2020",
minify: false,
// disable @rollup/plugin-commonjs https://github.com/vitejs/vite/issues/9703#issuecomment-1216662109
// should be removable with vite 4 https://vitejs.dev/blog/announcing-vite3.html#esbuild-deps-optimization-at-build-time-experimental
commonjsOptions: {
transformMixedEsModules: true,
},
// // https://vitejs.dev/guide/backend-integration.html#backend-integration
// manifest: true,
// rollupOptions: {
// // overwrite default .html entry
// input: '/src/server/main.ts',
// },
},
define: {
"process.env.NODE_DEBUG": "false",
global: "globalThis",
},
optimizeDeps: {
// enable esbuild dep optimization during build https://github.com/vitejs/vite/issues/9703#issuecomment-1216662109
// should be removable with vite 4 https://vitejs.dev/blog/announcing-vite3.html#esbuild-deps-optimization-at-build-time-experimental
disabled: false,
// target: es2020 added as workaround to make big ints work
// - should be removable with vite 4
// https://github.com/vitejs/vite/issues/9062#issuecomment-1182818044
esbuildOptions: {
target: "es2020",
},
},
});