-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.js
More file actions
54 lines (53 loc) · 1.67 KB
/
vite.config.js
File metadata and controls
54 lines (53 loc) · 1.67 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
import {fileURLToPath, URL} from 'node:url'
import {defineConfig} from 'vite'
import vue from '@vitejs/plugin-vue'
import vueDevTools from 'vite-plugin-vue-devtools'
import tailwindcss from '@tailwindcss/vite'
import Components from 'unplugin-vue-components/vite'
import {PrimeVueResolver} from '@primevue/auto-import-resolver'
import {NodeGlobalsPolyfillPlugin} from "@esbuild-plugins/node-globals-polyfill"
// https://vite.dev/config/
export default defineConfig({
plugins: [
vue(),
vueDevTools(),
tailwindcss(),
Components({resolvers: [PrimeVueResolver()]})
],
optimizeDeps: {
esbuildOptions: {
define: {
global: 'globalThis'
},
plugins: [
NodeGlobalsPolyfillPlugin({process: true, buffer: true})
]
}
},
build: {
emptyOutDir: true,
chunkSizeWarningLimit: 900,
rollupOptions: {
output: {
manualChunks: {
'wharfkit': ['@wharfkit/antelope', '@wharfkit/contract', '@wharfkit/signing-request', '@wharfkit/abicache', '@wharfkit/account', 'pako'],
'vue': ['vue', 'vue-router'],
'gui': ['primevue', 'tailwindcss-primeui', 'tailwindcss', '@primeuix/themes'],
}
}
},
},
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
buffer: 'rollup-plugin-node-polyfills/polyfills/buffer-es6',
event: 'rollup-plugin-node-polyfills/polyfills/events'
},
},
define: {
global: 'globalThis'
},
server: {
host: true
}
})