-
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 Javascript bundle replaced by a small sentry script #362
Comments
Hi, thanks for writing in. Unfortunately, I cannot reproduce your issue. Would you mind sharing a Stackblitz or a repo we could pull to reproduce this? Thanks! |
Thank you for the quick reply. I cannot share the repo unfortunately, I will try to create a sample repo or a stackblitz |
This issue has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you label it "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
@dragoon Do you remember if this issue was resolved, and if so, how you did it? Coming across the same thing and I'm stumped. |
This issue was closed due to inactivity. We need reproduction of this issue to be able to resolve it! |
@jam-fran no, I wasn't able to solve it, just not shipping source maps to sentry at the moment. I didn't have time to create a reproducible repo so far. |
@lforst I was working on a sample repo when I discovered this appears to be related to #471 -- when I added a default export to my app.ts file it worked as expected. Before:
After:
|
Great to know @jam-fran, it works indeed, I don't use any framework, my entry point is a plain javascript file, when I add |
That is odd... Maybe we can fix this somehow. |
Also ran into this with import { createRequire as _createRequire } from "module"
const require = _createRequire(import.meta.url)
var n =
typeof window < "u"
? window
: typeof global < "u"
? global
: typeof self < "u"
? self
: {}
n.SENTRY_RELEASE = { id: "x" }
;(function () {
try {
var e =
typeof window < "u"
? window
: typeof global < "u"
? global
: typeof self < "u"
? self
: {},
d = new Error().stack
d &&
((e._sentryDebugIds = e._sentryDebugIds || {}),
(e._sentryDebugIds[d] = "x"),
(e._sentryDebugIdIdentifier =
"sentry-dbid-x"))
} catch {}
})()
var b = void 0
export { b as default } Adding an export to the file, even though I don't need it, fixed the issue. This was a tough one to debug 😄 |
Environment
"@sentry/esbuild-plugin": "^2.5.0",
"esbuild": "^0.18.17",
Steps to Reproduce
Here is my build script
Expected Result
My actual bundle is generated.
Actual Result
Instead of my usual index.js bundle, here is the script that was generated with sentry esbuild plugin enabled:
I have no idea what is this script, but my usual bundle is nowhere to be found.
The text was updated successfully, but these errors were encountered: