-
Notifications
You must be signed in to change notification settings - Fork 1
/
vitest.config.ts
31 lines (29 loc) · 997 Bytes
/
vitest.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
/// <reference types="vitest" />
import { configDefaults, defineConfig } from 'vitest/config';
import tsconfigPaths from 'vite-tsconfig-paths';
import graphqlLoader from 'vite-plugin-graphql-loader';
import react from '@vitejs/plugin-react-swc';
import legacy from '@vitejs/plugin-legacy';
// https://vitejs.dev/config/
export default defineConfig({
define: {
__BUILD_TIMESTAMP__: new Date(),
__BASE_PATH__: JSON.stringify('http://localhost/min-side-arbeidsgiver'),
},
plugins: [
tsconfigPaths(),
graphqlLoader(),
react(),
legacy({
modernPolyfills: ['es.string.replace', 'esnext.string.replace-all'],
polyfills: ['es.string.replace', 'esnext.string.replace-all'],
}),
],
test: {
globals: true,
environment: 'jsdom',
exclude: [...configDefaults.exclude, './vitest.setup.ts', 'build/**/*'],
setupFiles: './vitest.setup.ts',
reporters: 'verbose',
},
});