generated from samhwang/vite-starter-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
41 lines (38 loc) · 991 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
36
37
38
39
40
41
/// <reference types="vitest" />
import { TanStackRouterVite } from '@tanstack/router-vite-plugin';
import reactBabel from '@vitejs/plugin-react';
import reactSwc from '@vitejs/plugin-react-swc';
import { defineConfig } from 'vite';
import { VitePWA } from 'vite-plugin-pwa';
import { manifest } from './metadata/metadata';
const useSwc = false;
const react = useSwc ? reactSwc : reactBabel;
// https://vitejs.dev/config/
export default defineConfig({
build: {
manifest: true,
},
plugins: [
react(),
TanStackRouterVite(),
VitePWA({
injectRegister: 'auto',
registerType: 'autoUpdate',
manifest,
}),
],
test: {
globals: true,
environment: 'jsdom',
setupFiles: ['src/setup-tests.ts'],
coverage: {
provider: 'v8',
enabled: !!process.env.CI,
exclude: ['styled-system', '**/*.config.*', '**/*.d.ts'],
include: ['src/resume/**', 'src/icons/**'],
},
typecheck: {
enabled: true,
},
},
});