mirror of
https://github.com/pdfme/pdfme.git
synced 2026-06-16 02:09:10 -04:00
- Show toast errors when Designer/Form/Viewer template loading fails instead of failing silently - Fix generatePDF: avoid Uint8Array view offset bug in Blob, revoke object URLs, replace alert with toast, and report success to callers - Make readFile reject on errors instead of hanging, and check response.ok in template fetches - Load GitHub avatars directly from github.com/<user>.png instead of the rate-limited API - Add single-project IndexedDB lookups instead of reading all projects on every get/save - Lazy-load all routes to split Designer/Templates/Form chunks out of the initial bundle - Gate Sentry plugin and sourcemaps on SENTRY_AUTH_TOKEN; skip Sentry.init without a DSN - Remove unused signature_pad dependency and validate persisted form/viewer mode Co-authored-by: Cursor <cursoragent@cursor.com>
31 lines
824 B
TypeScript
31 lines
824 B
TypeScript
import { sentryVitePlugin } from '@sentry/vite-plugin';
|
|
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
|
|
const sentryAuthToken = process.env.SENTRY_AUTH_TOKEN;
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
build: {
|
|
target: 'esnext',
|
|
// Source maps are only needed for the Sentry upload; emitting them without a
|
|
// token would just publish them with the deployed bundle.
|
|
sourcemap: Boolean(sentryAuthToken),
|
|
},
|
|
plugins: [
|
|
react(),
|
|
...(sentryAuthToken
|
|
? [
|
|
sentryVitePlugin({
|
|
org: 'hand-dot',
|
|
project: 'playground-pdfme',
|
|
authToken: sentryAuthToken,
|
|
sourcemaps: {
|
|
filesToDeleteAfterUpload: ['dist/**/*.js.map'],
|
|
},
|
|
}),
|
|
]
|
|
: []),
|
|
],
|
|
});
|