-
Notifications
You must be signed in to change notification settings - Fork 121
Expand file tree
/
Copy pathvite.config.ts
More file actions
30 lines (27 loc) · 846 Bytes
/
vite.config.ts
File metadata and controls
30 lines (27 loc) · 846 Bytes
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
import babel from "@rolldown/plugin-babel";
import react, { reactCompilerPreset } from "@vitejs/plugin-react";
import { defineConfig } from "vite";
/** Petrinaut website dev server and production build config. */
export default defineConfig(() => {
const environment = process.env.VITE_VERCEL_ENV ?? "development";
const sentryDsn: string | undefined = process.env.SENTRY_DSN;
return {
define: {
__ENVIRONMENT__: JSON.stringify(environment),
__SENTRY_DSN__: JSON.stringify(sentryDsn),
},
plugins: [
react(),
babel({
presets: [
reactCompilerPreset({
target: "19",
compilationMode: "infer",
// @ts-expect-error - panicThreshold is accepted at runtime
panicThreshold: "critical_errors",
}),
],
}),
],
};
});