forked from deriv-com/smarttrader_archived
-
Notifications
You must be signed in to change notification settings - Fork 1
/
vite.config.ts
35 lines (33 loc) · 990 Bytes
/
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
import { defineConfig } from 'vitest/config';
import react from '@vitejs/plugin-react';
import { resolve } from 'path';
const ALIASES = {
Components: resolve(__dirname, './src/components'),
Constants: resolve(__dirname, './src/constants'),
Contexts: resolve(__dirname, './src/contexts'),
Api: resolve(__dirname, './src/api'),
Utils: resolve(__dirname, './src/utils'),
Styles: resolve(__dirname, './src/styles'),
Translations: resolve(__dirname, './src/translations'),
Types: resolve(__dirname, './src/types'),
};
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
/* Absolute path */
resolve: { alias: ALIASES },
server: {
host: 'localhost',
port: 42069,
},
/* vitest configs */
test: {
environment: 'jsdom',
globals: true,
setupFiles: ['./vitest.setup.ts'],
coverage: {
reporter: 'lcov',
provider: 'v8',
},
},
});