generated from nikolailehbrink/retail
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
37 lines (34 loc) · 973 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
import { sentryVitePlugin } from "@sentry/vite-plugin";
import { vitePlugin as remix } from "@remix-run/dev";
import { installGlobals } from "@remix-run/node";
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";
import { vercelPreset } from "@vercel/remix/vite";
// This installs globals such as "fetch", "Response", "Request" and "Headers". See: https://remix.run/docs/en/main/other-api/node
installGlobals();
export default defineConfig(() => {
// Check if the code is not running on Vercel
if (!process.env.VERCEL) {
return {
test: {
include: ["**/*.test.ts", "**/*.test.tsx"],
},
plugins: [remix(), tsconfigPaths()],
};
}
return {
plugins: [
remix({
presets: [vercelPreset()],
}),
tsconfigPaths(),
sentryVitePlugin({
org: "nikolailehbrink",
project: "secret-messages",
}),
],
build: {
sourcemap: true,
},
};
});