-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
28 lines (25 loc) · 997 Bytes
/
Copy pathvite.config.ts
File metadata and controls
28 lines (25 loc) · 997 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
import { sentryVitePlugin } from "@sentry/vite-plugin";
import tailwindcss from "@tailwindcss/vite";
import { TanStackRouterVite } from "@tanstack/router-plugin/vite";
import viteReact from "@vitejs/plugin-react";
import path from "path";
import { defineConfig, loadEnv } from "vite";
import { analyzer } from "vite-bundle-analyzer";
export default defineConfig(({ mode }) => {
process.env = { ...process.env, ...loadEnv(mode, process.cwd()) };
return {
plugins: [
TanStackRouterVite(),
viteReact(),
tailwindcss(),
...(process.env.VITE_APP_ENV === "local" ? [analyzer()] : []),
sentryVitePlugin({
org: process.env.VITE_SENTRY_ORG,
project: process.env.VITE_SENTRY_PROJECT,
// Auth tokens can be obtained from https://sentry.io/orgredirect/organizations/:orgslug/settings/auth-tokens/
authToken: process.env.VITE_SENTRY_AUTH_TOKEN,
}),
],
resolve: { alias: { "@": path.resolve(__dirname, "./src") } },
};
});