-
-
Notifications
You must be signed in to change notification settings - Fork 198
feat: Install an JavaScript SDK during sentry:publish #647
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
stayallive
left a comment
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.
Only thing really is maybe to use import.meta.env.SENTRY_LARAVEL_DSN instead of hardcoding the DSN, otherwise this looks like it's more than sufficient!
This might be good enough because you would only use this in new packages, but another options would be to add a // @TODO: Read DSN from environment instead of hardcoded or something?
|
I think we need to prefix them with
https://vitejs.dev/guide/env-and-mode.html#env-files Let's target Laravel 10/9 with Vite, as 8 and below use Webpack. I don't see many people creating new projects with these older versions. I'll also add another "Vanilla.js" choice to install our default browser integration. Additionally, we can also expand the snippets, as all Laravel version ship with Axios by default, so we can also add performance monitoring. Brb! |
|
Ah right, the prefix, yes! We also need to publish that env variable then in addition to the regular DSN env variable, we can just add |
This is a little PoC to offer the installation of one of our JavaScript SDKs when running
php artisan sentry:publish.closes #646