-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
36 lines (35 loc) · 940 Bytes
/
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
import react from '@vitejs/plugin-react-swc'
import { defineConfig } from 'vite'
import topLevelAwait from 'vite-plugin-top-level-await'
import wasm from 'vite-plugin-wasm'
import { compression } from 'vite-plugin-compression2'
import inject from '@rollup/plugin-inject'
export default defineConfig({
plugins: [react(), topLevelAwait(), wasm(), compression()],
resolve: {
alias: {
'@components': '/src/components',
'@containers': '/src/containers',
'@pages': '/src/pages',
'@static': '/src/static',
'@store': '/src/store',
'@web3': '/src/web3',
'@utils': '/src/utils',
'@/': '/src'
}
},
server: {
host: 'localhost',
port: 3000
},
build: {
rollupOptions: {
external: ['fs/promises', 'path', 'invariant-vara-wasm'],
plugins: [inject({ Buffer: ['buffer', 'Buffer'] })]
}
},
esbuild: {
minifyIdentifiers: false,
keepNames: true
}
})