-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
Handle case where users use esbuild + bundle: true
#562
Comments
Any thoughts how to solve this? I imagine we'd need to parse some kind of config for this? |
I think as a first step, we could ask a question pretty early on "are you using bundle: true"? If so, we redirect to something like the CLI wizard. As a more involved solution we could try parsing the config, however I see that as very difficult since the configs are JS and could have runtime logic we can't statically infer. |
Additionally, we could even potentially adjust the esbuild plugin to invoke the CLI with the inject command after the build has finished instead of injecting the debug ids as part of esbuild transpilation. That would definitely be a bit more error prone though. |
Not just error prone but also it would change the integrity hash of the script if change it afterwards. Service workers don't like that stuff xD This is always a problem with CLI inject so I wouldn't do it from within the bundler plugin by default. |
But agree, asking is a great first step! Slightly more involved: Have a heuristic that superficially checks for |
Would probably work, but it would run into issues in case the option is "imported" from somewhere else, like inside of a shared config object or something. |
hmm yeah you're right, let's just keep it simple 😅 |
getsentry/sentry-javascript-bundler-plugins#445 (comment)
We need to solve this case ^
The text was updated successfully, but these errors were encountered: