This repository has been archived by the owner on Aug 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 337
Dist script should be named worker.js #681
Labels
bug
Something isn't working
Comments
that's interesting. Currently, Cloudflare worker hardcodes the name of the script as |
In any case Sentry won't work until worker.js is used in sourcemap. I hope you are able to confirm this issue and fix it (you don't need to use my solution). |
xtuc
added a commit
that referenced
this issue
Feb 14, 2020
`webpack` will by default emit a sourcemap that maps to a `main.js` file. However, the worker runtime will create the script with a `worker.js` name. In some cases (like devtools) it doesn't matter because it resolves the source infos based on the sourcemap `sources` key. In Sentry for instance, that would fail. Fixes #681
Implemented your fix in #1063. |
xtuc
added a commit
that referenced
this issue
Feb 14, 2020
`webpack` will by default emit a sourcemap that maps to a `main.js` file. However, the worker runtime will create the script with a `worker.js` name. In some cases (like devtools) it doesn't matter because it resolves the source infos based on the sourcemap `sources` key. In Sentry for instance, that would fail. Fixes #681
xtuc
added a commit
that referenced
this issue
Feb 14, 2020
`webpack` will by default emit a sourcemap that maps to a `main.js` file. However, the worker runtime will create the script with a `worker.js` name. In some cases (like devtools) it doesn't matter because it resolves the source infos based on the sourcemap `sources` key. In Sentry for instance, that would fail. Fixes #681
xtuc
added a commit
that referenced
this issue
Feb 14, 2020
`webpack` will by default emit a sourcemap that maps to a `main.js` file. However, the worker runtime will create the script with a `worker.js` name. In some cases (like devtools) it doesn't matter because it resolves the source infos based on the sourcemap `sources` key. In Sentry for instance, that would fail. Fixes #681
xtuc
added a commit
that referenced
this issue
Feb 14, 2020
`webpack` will by default emit a sourcemap that maps to a `main.js` file. However, the worker runtime will create the script with a `worker.js` name. In some cases (like devtools) it doesn't matter because it resolves the source infos based on the sourcemap `sources` key. In Sentry for instance, that would fail. Fixes #681
xtuc
added a commit
that referenced
this issue
Feb 14, 2020
`webpack` will by default emit a sourcemap that maps to a `main.js` file. However, the worker runtime will create the script with a `worker.js` name. In some cases (like devtools) it doesn't matter because it resolves the source infos based on the sourcemap `sources` key. In Sentry for instance, that would fail. Fixes #681
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
🐛 Bug Report
Environment
I'm using newest wrangler 1.4.0-rc.1
Steps to reproduce
The dist file and sourcemap are named
main.js
andmain.js.map
, but when using error reporting like sentry it turns out that server-side .js file is names worker.js. Because of this there's filename mismatch and sentry cannot link uploaded sourcemaps to error stacktrace and we get "Source code was not found" error.What did you expect to see?
If generated file and sourcemap were names worker.js Sentry would would out of the box.
Here's how proper configuration should look like:
The text was updated successfully, but these errors were encountered: