-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
48 lines (46 loc) · 986 Bytes
/
vite.config.ts
File metadata and controls
48 lines (46 loc) · 986 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/// <reference types="vitest" />
import analog from '@analogjs/platform';
import tailwindcss from '@tailwindcss/vite';
import { defineConfig } from 'vite';
// https://vitejs.dev/config/
export default defineConfig(({ mode }) => ({
build: {
target: ['es2020'],
},
resolve: {
mainFields: ['module'],
alias: {
'node-fetch': 'isomorphic-fetch',
},
},
ssr: {
noExternal: ['tslib', '@analogjs/trpc', '@trpc/server'],
},
plugins: [
analog({
ssr: true,
prerender: { routes: [] },
nitro: {
preset: 'vercel',
},
}),
tailwindcss(),
],
test: {
globals: true,
environment: 'jsdom',
setupFiles: ['src/test-setup.ts'],
include: ['**/*.spec.ts'],
reporters: ['default'],
},
define: {
'import.meta.vitest': mode !== 'production',
global: {},
},
server: {
cors: {
credentials: true,
},
allowedHosts: ['cpkeja-46-191-177-220.ru.tuna.am', 'localhost'],
},
}));