-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
37 lines (34 loc) · 1.24 KB
/
vite.config.ts
File metadata and controls
37 lines (34 loc) · 1.24 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
36
37
import { defineConfig } from 'vite';
import { tanstackStart } from '@tanstack/react-start/plugin/vite';
import react from '@vitejs/plugin-react';
import tailwindcss from '@tailwindcss/vite';
import tsConfigPaths from 'vite-tsconfig-paths';
import { cjsInterop } from 'vite-plugin-cjs-interop';
import { wrapVinxiConfigWithSentry } from '@sentry/tanstackstart-react';
const config = defineConfig({
plugins: [
tsConfigPaths({
projects: ['./tsconfig.json'],
}),
tailwindcss(),
tanstackStart(),
react({ babel: { plugins: ['babel-plugin-react-compiler', 'relay'] } }),
cjsInterop({
// List of CJS dependencies that require interop in the NODE environment
// this is a quirk - in an ideal world these packages work in both environments
dependencies: ['react-relay', 'relay-runtime'],
}),
],
server: {
open: true,
port: 3000,
},
});
export default wrapVinxiConfigWithSentry(config, {
org: process.env.VITE_SENTRY_ORG,
project: process.env.VITE_SENTRY_PROJECT,
authToken: process.env.SENTRY_AUTH_TOKEN,
// Only print logs for uploading source maps in CI
// Set to `true` to suppress logs
silent: !process.env.CI,
});