-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvite.config.ts
42 lines (41 loc) · 1.12 KB
/
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 vue from '@vitejs/plugin-vue';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
build: {
//TODO maybe remove on cleanup session
target: 'esnext',
},
define: {
__APP_VERSION__: JSON.stringify(process.env.npm_package_version),
__BUILD_DATE__: JSON.stringify(new Date().toISOString()),
__BUILD_BRANCH__: JSON.stringify(process.env.VITE_GIT_BRANCH),
__BUILD_REVISION__: JSON.stringify(process.env.VITE_GIT_REVISION),
},
server: {
port: 3000,
proxy: {
'/api': {
target: process.env.VITE_LOCAL_BACKEND
? 'http://localhost:8080/api'
: 'https://studymanager.platform-test.more.redlink.io/api',
changeOrigin: true,
secure: false,
rewrite: (path) => {
return path.replace(/^\/api/, '');
},
},
},
},
test: {
include: ['tests/**/*.spec.ts'],
environment: 'jsdom',
coverage: {
provider: 'v8',
reportsDirectory: 'tests/coverage',
exclude: ['src/generated-sources/**'],
},
},
});