@xtuc has a WIP PR that would add sourcemaps to anything published with wrangler. we should utilize these maps in wrangler dev. @xtuc has already implemented source maps in the devtools protocol - the source map is accessible as base64 encoded json
@xtuc would need to talk with runtime team about how we would possibly move forward with this approach. He noted a possible concern with regards to leaking meaningful stack traces in response bodies.
This approach is probably the easiest but would require any new clients to also implement their own source map handling approach. My guess is that long term we probably want the runtime to support this.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This would be a very welcome feature 馃挴
Not using sourcemaps makes working with workers harder than it has to be.
In wrangler dev we should make webpack always generate a sourcemap, serve it with a new local HTTP server and inject a sourceMappingURL in the worker that points locally.
When the worker runtime will load the worker it will send that source map URL to the devtools that it can download from the user endpoint.
@xtuc would we need cloudflared for that to expose the local source map to the public internet?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I think stale bot might have been a bit too keen to close this issue. I would still very much like to have source maps for my worker scripts
Most helpful comment
I think stale bot might have been a bit too keen to close this issue. I would still very much like to have source maps for my worker scripts