Skip to content
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

Figure out how to encourage vanilla TypeScript users to use npm package for browser SDK #11712

Open
AbhiPrasad opened this issue Nov 1, 2024 · 1 comment

Comments

@AbhiPrasad
Copy link
Member

SDK

JavaScript SDK

Description

As was raised in getsentry/sentry-javascript#5409 (comment), folks who use TypeScript probably should use the npm package @sentry/browser for the best experience, but currently our docs + onboarding pushes them to use the loader/cdn.

This is not a great experience because the CDN/loader isn't typed, and because of the permutations of the CDN bundles the types are hard to figure out (tracing bundle vs. replay bundle).

Suggested Solution

We should have a flow in onboarding where if you are using a vanilla js app with TypeScript we encourage you to use the npm bundle.

@matejminar
Copy link
Member

Makes perfect sense!
Two quick solutions that come to my mind (product-wise) are:

  1. We add another switch above Loader/NPM to choose between JavaScript/Typescript (choosing TS will preselect NPM or won't even show the second switch)
    Image

  2. We add Typescript to this screen:
    Image

@AbhiPrasad Do you have any preferences or different suggestions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants