Skip to content

fix: Only import inspector asynchronously #12231

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

Merged
merged 4 commits into from
May 27, 2024

Conversation

timfish
Copy link
Collaborator

@timfish timfish commented May 27, 2024

Closes #12223

I've added a test that uses import-in-the-middle to throw if inspector is imported without enabling the LocalVariables integration so this should not regress in the future.

Note that we don't need to import asynchronously in the worker scripts since these are not evaluated if the features aren't used.

Copy link
Contributor

github-actions bot commented May 27, 2024

size-limit report 📦

Path Size
@sentry/browser 21.74 KB (0%)
@sentry/browser (incl. Tracing) 32.75 KB (0%)
@sentry/browser (incl. Tracing, Replay) 68.22 KB (0%)
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 61.64 KB (0%)
@sentry/browser (incl. Tracing, Replay with Canvas) 72.27 KB (0%)
@sentry/browser (incl. Tracing, Replay, Feedback) 84.33 KB (0%)
@sentry/browser (incl. Tracing, Replay, Feedback, metrics) 85.8 KB (0%)
@sentry/browser (incl. metrics) 23.13 KB (0%)
@sentry/browser (incl. Feedback) 37.75 KB (0%)
@sentry/browser (incl. sendFeedback) 26.32 KB (0%)
@sentry/browser (incl. FeedbackAsync) 30.74 KB (0%)
@sentry/react 24.43 KB (0%)
@sentry/react (incl. Tracing) 35.75 KB (0%)
@sentry/vue 25.68 KB (0%)
@sentry/vue (incl. Tracing) 34.56 KB (0%)
@sentry/svelte 21.88 KB (0%)
CDN Bundle 24.28 KB (0%)
CDN Bundle (incl. Tracing) 34.22 KB (0%)
CDN Bundle (incl. Tracing, Replay) 68.04 KB (0%)
CDN Bundle (incl. Tracing, Replay, Feedback) 73.05 KB (0%)
CDN Bundle - uncompressed 71.46 KB (0%)
CDN Bundle (incl. Tracing) - uncompressed 101.58 KB (0%)
CDN Bundle (incl. Tracing, Replay) - uncompressed 211.48 KB (0%)
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 223.86 KB (0%)
@sentry/nextjs (client) 35.1 KB (0%)
@sentry/sveltekit (client) 33.35 KB (0%)
@sentry/node 114.65 KB (+0.05% 🔺)
@sentry/aws-serverless 103.32 KB (+0.03% 🔺)

@timfish timfish marked this pull request as ready for review May 27, 2024 10:52
@timfish timfish marked this pull request as draft May 27, 2024 11:04
@timfish
Copy link
Collaborator Author

timfish commented May 27, 2024

Just converted back to a draft because I'm going to try add a test for this so it doesn't regress again!

@timfish timfish marked this pull request as ready for review May 27, 2024 11:20
@timfish timfish force-pushed the timfish/fix-import-inspector branch from a44e99b to 197d9a5 Compare May 27, 2024 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regression: Error [ERR_INSPECTOR_NOT_AVAILABLE]: Inspector is not available when using vercel/pkg
3 participants