-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
feat(platform): Add placeholder for automatically detecting js package #11724
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
Bundle ReportChanges will decrease total bundle size by 2.26kB (-0.01%) ⬇️. This is within the configured threshold ✅ Detailed changes
|
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.
Awesome 🎉
| @@ -1,17 +0,0 @@ | |||
| ```javascript {13} {filename:sentry.client.config.js} | |||
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.
m: These filenames are important, I don't think we can just remove these and have the blocks generic :(
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.
hmm, maybe we can add a frontmatter bit with the filename somewhere?
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 are right, I missed that. That's actually bad since this will force us again to create separate files.
@a-hariti adding config file names would get messy since some frameworks have up to three different config files depending on the runtime
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.
I'm not sure if the need for this feature is actually worth the time, maybe we'll just close it and not overcomplicate this here – wdyt?
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.
I agree
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.
Agreed on closing
closes #9013
The new placeholder
___JS_PACKAGE___can be used within code blocks and automatically injects the corresponding node package (e.g. resolves to@sentry/react). So code snippets in platform includes that basically contain the same code apart from the import statement can now be replaced with a single code snippet.The pr also includes an example where this feature is used for replay canvas.