forked from zmc/pulpito-ng
-
Notifications
You must be signed in to change notification settings - Fork 5
/
vite.config.js
39 lines (39 loc) · 867 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
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import { sentryVitePlugin } from "@sentry/vite-plugin";
const DEPLOYMENT = process.env.DEPLOYMENT;
export default defineConfig(() => {
let config = {
build: {
outDir: "build",
sourcemap: true, // for Sentry
},
plugins: [
react(),
// Sentry vite plugin goes after all other plugins
sentryVitePlugin({
authToken: process.env.SENTRY_AUTH_TOKEN,
org: "ceph",
project: "pulpito-ng",
url: "https://sentry.ceph.com/",
}),
],
preview: {
port: 8081,
}
};
if (DEPLOYMENT == "development") {
config['server'] = {
port: 8081,
host: true,
watch: {
usePolling: true,
},
}
} else {
config['server'] = {
port: 8081,
}
}
return config;
});