-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvite.config.js
35 lines (34 loc) · 862 Bytes
/
vite.config.js
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
import { defineConfig } from 'vite';
import legacy from '@vitejs/plugin-legacy';
import react from '@vitejs/plugin-react';
// https://vitejs.dev/config/
export default defineConfig({
// This changes the output dir from dist to build
// comment this out if that isn't relevant for your project
build: {
outDir: '../dist/ui'
},
root: 'ui',
plugins: [
react(),
legacy({
targets: ['defaults', 'ie >= 11', 'chrome >= 60'],
additionalLegacyPolyfills: ['regenerator-runtime/runtime']
})
],
server: {
proxy: {
'/api': 'http://localhost:1337/'
}
},
test: {
include: ['**/__tests__/**.{ts,tsx}'],
setupFiles: ["./setup-tests/mongo-memory-server.ts"],
coverage: {
reportsDirectory: '../coverage'
}
},
define: {
APP_VERSION: JSON.stringify(process.env.npm_package_version)
}
});