generated from UniversityOfHelsinkiCS/toskaboiler
-
Notifications
You must be signed in to change notification settings - Fork 9
/
vite.config.ts
44 lines (41 loc) · 919 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
43
44
import react from '@vitejs/plugin-react-swc'
import eslint from 'vite-plugin-eslint'
import * as config from 'config'
import { defineConfig } from 'vite'
import { sentryVitePlugin } from '@sentry/vite-plugin'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
react(),
eslint(),
sentryVitePlugin({
applicationKey: 'norppa-course-feedback',
}),
],
server: {
proxy: {
'/api/': {
target: 'http://127.0.0.1:8000',
},
'/test/': {
target: 'http://127.0.0.1:8000',
},
},
host: true,
port: 3000,
},
build: {
outDir: 'build/client',
sourcemap: true,
},
define: {
'process.env': process.env,
CONFIG: (() => {
const configObj = config.util.toObject(undefined)
for (const key of config.get('PRIVATE_KEYS')) {
delete configObj[key]
}
return configObj
})(),
},
})