forked from revisit-studies/study
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
28 lines (26 loc) · 818 Bytes
/
vite.config.ts
File metadata and controls
28 lines (26 loc) · 818 Bytes
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
/// <reference types="vitest/config" />
import { defineConfig, loadEnv } from 'vite';
import react from '@vitejs/plugin-react-swc';
// https://vitejs.dev/config/
export default defineConfig(({ command, mode }) => {
const env = loadEnv(mode, process.cwd());
return {
base: command === 'build' ? env.VITE_BASE_PATH : '/',
plugins: [
react({ devTarget: 'es2022' }),
],
resolve: {
alias: {
// /esm/icons/index.mjs only exports the icons statically, so no separate chunks are created
'@tabler/icons-react': '@tabler/icons-react/dist/esm/icons/index.mjs',
},
},
test: {
exclude: ['./tests/**', 'node_modules/**'],
setupFiles: ['vitest-localstorage-mock'],
fileParallelism: true,
maxWorkers: '100%',
minWorkers: 1,
},
};
});