mosh-helpdesk/client/vite.config.ts

49 lines
1.1 KiB
TypeScript
Raw Normal View History

2026-02-11 21:33:34 +01:00
import path from "path"
2026-02-09 18:55:29 +01:00
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
2026-02-11 20:21:34 +01:00
import tailwindcss from '@tailwindcss/vite'
2026-03-03 18:16:47 +01:00
import { sentryVitePlugin } from "@sentry/vite-plugin"
2026-02-09 18:55:29 +01:00
// https://vite.dev/config/
export default defineConfig({
2026-03-03 18:16:47 +01:00
plugins: [
tailwindcss(),
react(),
sentryVitePlugin({
disable: !process.env.SENTRY_AUTH_TOKEN,
org: process.env.SENTRY_ORG,
project: process.env.SENTRY_PROJECT,
authToken: process.env.SENTRY_AUTH_TOKEN,
}) as any,
],
build: {
sourcemap: "hidden",
},
2026-02-11 21:33:34 +01:00
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
2026-02-23 18:03:04 +01:00
"react": path.resolve(__dirname, "./node_modules/react"),
"react-dom": path.resolve(__dirname, "./node_modules/react-dom"),
2026-02-11 21:33:34 +01:00
},
},
2026-02-09 18:55:29 +01:00
server: {
port: 5173,
proxy: {
'/api': {
2026-02-13 17:46:19 +01:00
target: process.env.VITE_API_URL || 'http://localhost:3000',
2026-02-09 18:55:29 +01:00
changeOrigin: true,
},
},
},
2026-02-16 21:04:25 +01:00
test: {
globals: true,
environment: "jsdom",
setupFiles: "./src/test/setup.ts",
2026-02-23 18:03:04 +01:00
server: {
deps: {
inline: ["@tanstack/react-table"],
},
},
2026-02-16 21:04:25 +01:00
},
2026-02-09 18:55:29 +01:00
})