-
Notifications
You must be signed in to change notification settings - Fork 3
/
vite.config.ts
42 lines (40 loc) · 994 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
42
/// <reference types="vitest" />
import { defineConfig } from 'vite';
import analog from '@analogjs/platform';
import { speakersResource } from './src/app/resources/speakers.resource';
// https://vitejs.dev/config/
export default defineConfig(({ mode }) => ({
publicDir: 'src/assets',
build: {
target: ['es2020'],
},
resolve: {
mainFields: ['module'],
},
plugins: [
analog({
static: true,
prerender: {
routes: async () => [
'/',
'/team',
'/code-of-conduct',
'/terms-and-privacy',
'/not-found',
...speakersResource.getSpeakers().map(({ id }) => `/speakers/${id}`),
],
sitemap: { host: 'https://angularbelgrade.org/' },
},
nitro: { serveStatic: false },
}),
],
test: {
globals: true,
environment: 'jsdom',
setupFiles: ['src/test.ts'],
include: ['**/*.spec.ts'],
},
define: {
'import.meta.vitest': mode !== 'production',
},
}));