forked from solana-foundation/explorer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.mts
More file actions
63 lines (59 loc) · 1.97 KB
/
vite.config.mts
File metadata and controls
63 lines (59 loc) · 1.97 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
import react from '@vitejs/plugin-react';
import path from 'path';
import { defineConfig } from 'vitest/config';
const specWorkspace = (name = 'specs') => ({
environment: 'jsdom',
globals: true,
name,
server: {
deps: {
inline: [
'@noble',
'change-case',
'@react-hook/previous',
'@solana/kit',
'@solana/rpc',
'@solana/rpc-spec',
'@solana/event-target-impl',
'@solana/addresses',
],
},
},
setupFiles: ['./test-setup.ts'],
testTimeout: 10000,
});
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
'@/': path.resolve(__dirname, './'),
'@/app': path.resolve(__dirname, './app'),
'@/components': path.resolve(__dirname, './app/components'),
'@/providers': path.resolve(__dirname, './app/providers'),
'@/utils': path.resolve(__dirname, './app/utils'),
'@/validators': path.resolve(__dirname, './app/validators'),
// @ aliases
'@app': path.resolve(__dirname, './app'),
'@img': path.resolve(__dirname, './app/img'),
'@components': path.resolve(__dirname, './app/components'),
'@entities': path.resolve(__dirname, './app/entities'),
'@features': path.resolve(__dirname, './app/features'),
'@providers': path.resolve(__dirname, './app/providers'),
'@shared': path.resolve(__dirname, './app/components/shared'),
'@utils': path.resolve(__dirname, './app/utils'),
'@validators': path.resolve(__dirname, './app/validators'),
},
conditions: ['browser', 'default'],
},
test: {
coverage: {
provider: 'v8',
},
poolOptions: {
threads: {
useAtomics: true,
},
},
...specWorkspace(),
},
});