forked from asgardex/asgardex-desktop
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.storybook.js
More file actions
67 lines (65 loc) · 1.88 KB
/
vite.storybook.js
File metadata and controls
67 lines (65 loc) · 1.88 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
55
56
57
58
59
60
61
62
63
64
65
66
67
import path from 'path'
import inject from '@rollup/plugin-inject'
import react from '@vitejs/plugin-react'
import { defineConfig } from 'vite'
import svgr from 'vite-plugin-svgr'
export default defineConfig({
plugins: [react(), svgr()],
resolve: {
alias: {
process: 'process/browser',
stream: 'stream-browserify',
crypto: 'crypto-browserify',
assert: 'assert',
path: path.resolve(__dirname, 'empty.js'),
url: path.resolve(__dirname, 'empty.js'),
https: path.resolve(__dirname, 'empty.js'),
http: path.resolve(__dirname, 'empty.js'),
zlib: path.resolve(__dirname, 'empty.js'),
fs: path.resolve(__dirname, 'empty.js')
}
},
optimizeDeps: {
include: ['process', 'buffer'],
esbuildOptions: {
inject: ['./src/shims/buffer-shim.js']
}
},
build: {
rollupOptions: {
output: {
manualChunks: {
vendor: ['react', 'react-dom', 'react-router-dom'],
crypto: ['crypto-browserify', 'stream-browserify', 'readable-stream'],
xchain: [
'@xchainjs/xchain-wallet',
'@xchainjs/xchain-doge',
'@xchainjs/xchain-litecoin',
'@xchainjs/xchain-bitcoin',
'@xchainjs/xchain-ethereum',
'@xchainjs/xchain-cosmos',
'@xchainjs/xchain-thorchain',
'@xchainjs/xchain-client',
'@xchainjs/xchain-crypto',
'@xchainjs/xchain-util'
]
}
},
plugins: [
inject({
Buffer: ['buffer', 'Buffer']
})
]
},
commonjsOptions: {
transformMixedEsModules: false
}
},
define: {
'process.env': {},
global: 'globalThis',
$COMMIT_HASH: JSON.stringify(process.env.COMMIT_HASH || 'dev'),
$VERSION: JSON.stringify(process.env.npm_package_version),
$IS_DEV: JSON.stringify(process.env.NODE_ENV !== 'production')
}
})