-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.js
More file actions
49 lines (48 loc) · 1.62 KB
/
Copy pathvite.config.js
File metadata and controls
49 lines (48 loc) · 1.62 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
38
39
40
41
42
43
44
45
46
47
48
49
import { reactRouter } from "@react-router/dev/vite";
import tailwindcss from "@tailwindcss/vite";
import { defineConfig } from "vite";
import { sentryVitePlugin } from "@sentry/vite-plugin";
// import netlifyPlugin from '@netlify/vite-plugin-react-router'
export default defineConfig({
build: {
sourcemap: process.env.SENTRY_AUTH_TOKEN ? "hidden" : false,
},
ssr: {
noExternal: ["react-joyride"],
},
plugins: [
tailwindcss(),
reactRouter(),
...(process.env.SENTRY_AUTH_TOKEN
? [
sentryVitePlugin({
org: process.env.SENTRY_ORG,
project: process.env.SENTRY_PROJECT,
authToken: process.env.SENTRY_AUTH_TOKEN,
sourcemaps: {
filesToDeleteAfterUpload: ["./build/**/*.map"],
},
}),
]
: []),
// netlifyPlugin(),
],
resolve: {
tsconfigPaths: true,
alias: {
"@": "/app",
"@actions": "/actions",
"@components": "/app/components",
"@constants": "/app/constants",
"@contexts": "/app/contexts",
"@forms": "/app/forms",
"@hooks": "/app/hooks",
"@loaders": "/app/loaders",
"@routes": "/app/routes",
"@styles": "/app/styles",
// /esm/icons/index.mjs only exports the icons statically, so no separate chunks are created
"@tabler/icons-react":
"@tabler/icons-react/dist/esm/icons/index.mjs",
},
},
});