-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Expand file tree
/
Copy pathvite.config.ts
More file actions
35 lines (31 loc) · 1.08 KB
/
vite.config.ts
File metadata and controls
35 lines (31 loc) · 1.08 KB
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
import { defineConfig } from 'vite';
import tsConfigPaths from 'vite-tsconfig-paths';
import { tanstackStart } from '@tanstack/react-start/plugin/vite';
import viteReact from '@vitejs/plugin-react-swc';
import { nitro } from 'nitro/vite';
import { sentryTanstackStart } from '@sentry/tanstackstart-react/vite';
const useTunnelRoute = process.env.E2E_TEST_USE_TUNNEL_ROUTE === '1';
const appDsn = useTunnelRoute ? 'http://public@localhost:3031/1337' : 'https://public@dsn.ingest.sentry.io/1337';
const appTunnel = useTunnelRoute ? '/monitor' : 'http://localhost:3031/';
export default defineConfig({
server: {
port: 3000,
},
define: {
__APP_DSN__: JSON.stringify(appDsn),
__APP_TUNNEL__: JSON.stringify(appTunnel),
},
plugins: [
tsConfigPaths(),
tanstackStart(),
nitro(),
// react's vite plugin must come after start's vite plugin
viteReact(),
sentryTanstackStart({
org: process.env.E2E_TEST_SENTRY_ORG_SLUG,
project: process.env.E2E_TEST_SENTRY_PROJECT,
authToken: process.env.E2E_TEST_AUTH_TOKEN,
debug: true,
}),
],
});