forked from Laboratoria/curriculum
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.js
49 lines (46 loc) · 989 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import { defineConfig } from 'vite';
import { sentryVitePlugin } from '@sentry/vite-plugin';
import react from '@vitejs/plugin-react';
import dotenv from 'dotenv';
dotenv.config();
const {
FIREBASE_PROJECT,
FIREBASE_API_KEY,
LABORATORIA_CORE_API_URL,
SENTRY_DSN,
npm_package_version,
} = process.env;
export default defineConfig(() => {
return {
server: {
host: 'localhost',
port: 3000,
},
define: {
'process.env': {
FIREBASE_PROJECT,
FIREBASE_API_KEY,
LABORATORIA_CORE_API_URL,
SENTRY_DSN,
VERSION: npm_package_version,
},
},
build: {
outDir: 'build',
sourcemap: true,
},
plugins: [
react(),
sentryVitePlugin({
org: 'laboratoria',
project: 'curriculum',
authToken: process.env.SENTRY_AUTH_TOKEN,
}),
],
test: {
globals: true,
environment: 'jsdom',
setupFiles: ['./src/setupTests.js'],
},
};
});