blog/frontend/vite.config.ts
SquidSpirit aaf4069cbf
All checks were successful
Frontend CI / build (push) Successful in 1m16s
BLOG-90 feat: integrate Sentry for error tracking and performance monitoring
- Added Sentry initialization in both client and server hooks.
- Configured Sentry with environment variables for DSN and sampling rates.
- Implemented error handling with Sentry in server hooks.
- Updated environment configuration to include SENTRY_DSN.
- Configured Vite to upload source maps to Sentry.
2025-08-06 06:44:14 +08:00

32 lines
645 B
TypeScript

import { sentrySvelteKit } from '@sentry/sveltekit';
import tailwindcss from '@tailwindcss/vite';
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vite';
import { version } from './package.json';
export default defineConfig({
plugins: [
sentrySvelteKit({
sourceMapsUploadOptions: {
org: 'squidspirit',
project: 'blog-beta-frontend'
}
}),
tailwindcss(),
sveltekit()
],
define: {
'App.__VERSION__': JSON.stringify(version)
},
server: {
proxy: {
'/api': {
target: 'http://127.0.0.1:8080',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '')
}
}
}
});