-
Notifications
You must be signed in to change notification settings - Fork 298
/
vite.config.mts
37 lines (35 loc) · 1.12 KB
/
vite.config.mts
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
/// <reference types="vitest" />
import angular from '@analogjs/vite-plugin-angular';
import { defineConfig } from 'vite';
import tsconfigPaths from 'vite-tsconfig-paths';
// https://vitejs.dev/config/
export default defineConfig(({ mode }) => {
return {
plugins: [angular(), tsconfigPaths()],
test: {
globals: true,
environment: 'jsdom',
setupFiles: ['src/test/javascript/vitest/vitest-setup.ts'],
include: ['src/test/javascript/vitest/**/*.spec.ts'],
exclude: [
'src/main/resources/**',
'build/resources/**', // Exclude problematic directories
],
reporters: ['default']
},
resolve: {
alias: {
// Manually resolve the "app/*" alias if needed
app: '/src/main/webapp/app',
},
},
build: {
rollupOptions: {
external: [/build\/resources\/.*/, /src\/main\/resources\/.*/],
},
},
define: {
'import.meta.vitest': mode !== 'production',
},
};
});