mirror of
https://github.com/mosh-hamedani/helpdesk.git
synced 2026-05-21 11:58:19 +02:00
52 lines
1.2 KiB
TypeScript
52 lines
1.2 KiB
TypeScript
import path from "path"
|
|
import { createRequire } from "module"
|
|
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
import { sentryVitePlugin } from "@sentry/vite-plugin"
|
|
|
|
const require = createRequire(import.meta.url)
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
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",
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src"),
|
|
"react": path.dirname(require.resolve("react/package.json")),
|
|
"react-dom": path.dirname(require.resolve("react-dom/package.json")),
|
|
},
|
|
},
|
|
server: {
|
|
port: 5173,
|
|
proxy: {
|
|
'/api': {
|
|
target: process.env.VITE_API_URL || 'http://localhost:3000',
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
test: {
|
|
globals: true,
|
|
environment: "jsdom",
|
|
setupFiles: "./src/test/setup.ts",
|
|
server: {
|
|
deps: {
|
|
inline: ["@tanstack/react-table"],
|
|
},
|
|
},
|
|
},
|
|
})
|