-
Notifications
You must be signed in to change notification settings - Fork 2.2k
/
vite.config.ts
36 lines (33 loc) · 1.22 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
import { sveltekit } from '@sveltejs/kit/vite';
import dotenv from 'dotenv';
import { defineConfig } from 'vite';
import tsconfigPaths from 'vite-tsconfig-paths';
import { generateBridgeConfig } from './scripts/vite-plugins/generateBridgeConfig';
import { generateChainConfig } from './scripts/vite-plugins/generateChainConfig';
import { generateCustomTokenConfig } from './scripts/vite-plugins/generateCustomTokenConfig';
import { generateEventIndexerConfig } from './scripts/vite-plugins/generateEventIndexerConfig';
import { generateRelayerConfig } from './scripts/vite-plugins/generateRelayerConfig';
if (process.env.NODE_ENV === 'test') {
dotenv.config({ path: './.env.test' });
}
export default defineConfig({
build: {
sourcemap: true,
},
plugins: [
sveltekit(),
// This plugin gives vite the ability to resolve imports using TypeScript's path mapping.
// https://www.npmjs.com/package/vite-tsconfig-paths
tsconfigPaths({ ignoreConfigErrors: true }),
generateBridgeConfig(),
generateChainConfig(),
generateRelayerConfig(),
generateCustomTokenConfig(),
generateEventIndexerConfig(),
],
test: {
environment: 'jsdom',
globals: true,
include: ['./**/*.{test,spec}.{js,ts}'],
},
});