-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathvite.config.mts
More file actions
56 lines (52 loc) · 1.31 KB
/
vite.config.mts
File metadata and controls
56 lines (52 loc) · 1.31 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/// <reference types='vitest' />
import angular from '@analogjs/vite-plugin-angular';
import { Plugin } from 'vite';
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
function virtualPwaRegisterStub(): Plugin {
return {
name: 'virtual-pwa-register-stub',
resolveId(id) {
if (id === 'virtual:pwa-register') return '\0virtual:pwa-register';
},
load(id) {
if (id === '\0virtual:pwa-register')
return `export function registerSW() { return async () => {}; }`;
},
};
}
export const baseConfig = {
root: __dirname,
plugins: [angular(), nxViteTsPaths(), virtualPwaRegisterStub()],
test: {
watch: false,
globals: true,
isolate: true,
environment: 'jsdom',
include: ['**/*.spec.ts'],
setupFiles: ['src/test-setup.ts'],
reporters: ['default', 'junit'],
coverage: {
provider: 'v8',
reporter: ['text', 'cobertura'],
include: ['src/**/*.{ts,tsx}'],
exclude: [
'src/**/*.routes.ts',
'src/**/*.config.ts',
'src/main.ts',
'src/environments/**',
],
thresholds: {
perFile: true,
statements: 80,
branches: 80,
functions: 80,
lines: 80,
},
},
server: {
deps: {
inline: ['@angular/material'],
},
},
},
};