-
Notifications
You must be signed in to change notification settings - Fork 37
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
esbuild-plugin
overrides injected variables
#413
Comments
Hi @ilijapuaca thanks for investigating! We need to take a look at this. Backlogging for now. |
@ilijapuaca Hey, so I attempted to reproduce your problem. I couldn't encounter what you were describing so I added an integration test to our test suite that verifies this. Can you check whether this actually tests what you are describing?: #416 |
@ilijapuaca Nevermind I see the issue now. I was confused because in the tests |
Thanks for a quick patch! I was under the impression that it happened due to debug ID being injected into the files that the user is injecting themselves, but out of curiosity, any idea why it started happening with the new release of esbuild? I also saw that a new release went out, impressive turnaround :) |
@ilijapuaca Honestly no idea. Nothing in the esbuild release notes strikes me as breaking for our case. Did you upgrade from 18.x or earlier? |
|
I'm gonna say it's a blip and not gonna worry about it anymore 😄 Thanks for reporting this and following up! |
Environment
What version are you running? Etc.
@sentry/[email protected]
,[email protected]
Steps to Reproduce
This surfaced after upgrading to esbuild
0.19.0
, but perhaps more widely spread and related to this issue?When
@sentry/esbuild-plugin
is used, the built bundle would crash withReferenceError: process is not defined
when run. I spent some time comparing the output with and without Sentry plugin, here's the minimal repro setup:build-config/build.js
build-config/inject.js
src/index.ts
Expected Result
Before esbuild
0.19
the output injection piece would look something like this:Actual Result
Instead, now it outputs something like this:
There seems to be some weird circular relationship between the inject functions, and the addition of
init_sentry_debug_id_injection_stub
which previously wasn't there. The piece causing the actual issue is the lack ofvar process, global;
which seems to be gone altogetherThe text was updated successfully, but these errors were encountered: