-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(tanstackstart-react): Add Vite Config Wrapper for Source Map Uploads #18712
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
node-overhead report 🧳Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.
|
| /** | ||
| * Build options for the Sentry plugin. These options are used during build-time by the Sentry SDK. | ||
| */ | ||
| export type SentryTanstackStartReactPluginOptions = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can/should extend from this type, so we can make sure that all build-time options are aligned:
| export interface BuildTimeOptionsBase { |
| if (process.env.NODE_ENV !== 'development') { | ||
| // Check if source maps upload is enabled | ||
| // Default to enabled | ||
| const sourceMapsEnabled = options.sourceMapsUploadOptions?.enabled ?? true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You probably want to use options.sourcemaps.disable here. Also make sure people can still create a release, even if they don't want to upload source maps.
Adds
wrapConfigWithSentryvite config wrapper to enable automatic source map uploads in Tanstack Start applications.What it does
I tried to align with what we do in other SDKs (e.g. solid start). On a high-level it:
@sentry/vite-pluginif configured, mainly passing through the options set by the user.mapfiles after the source map uploadhiddensource map uploadUsage
Tests
sourceMaps.tsandaddSentryPlugins.tscovering plugin composition, options passing, and source map settings logicCloses #18664