-
Notifications
You must be signed in to change notification settings - Fork 8
/
vite.config.ts
47 lines (46 loc) · 1.17 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
39
40
41
42
43
44
45
46
47
import { NodeGlobalsPolyfillPlugin } from '@esbuild-plugins/node-globals-polyfill';
import { nodePolyfills } from 'vite-plugin-node-polyfills';
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vite';
import wasm from 'vite-plugin-wasm';
import topLevelAwait from 'vite-plugin-top-level-await';
export default defineConfig({
plugins: [wasm(), topLevelAwait(), nodePolyfills(), sveltekit()],
optimizeDeps: {
include: [
'liquidjs-lib',
'@vulpemventures/secp256k1-zkp',
'bitcoinjs-lib',
'crypto',
'ecpair',
'tiny-secp256k1',
'nostr-tools',
'qrcode-generator',
'bitcoinjs-lib/src/psbt/bip371',
'liquidjs-lib/src/psetv2',
'liquidjs-lib/src/psetv2/utils',
'liquidjs-lib/src/confidential',
'liquidjs-lib/src/transaction',
'liquidjs-lib/src/value',
'liquidjs-lib/src/issuance',
'liquidjs-lib/src/asset'
],
esbuildOptions: {
// Node.js global to browser globalThis
define: {
global: 'globalThis'
},
// Enable esbuild polyfill plugins
plugins: [
NodeGlobalsPolyfillPlugin({
buffer: true
})
]
}
},
build: {
rollupOptions: {
external: ['@vulpemventures/secp256k1-zkp']
}
}
});