-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
@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
Possible implementations
- Implement in the runtime
- JavaScript implementation
- probably easier
- C++/KJ implementation
- possibly more performant
- JavaScript implementation
@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.
- Implement everything in Wrangler
- could parse base64 sourcemap from devtools and compute accurate line numbers from lineNumber and columnNumber fields from devtools
- alternatively could read in source map from webpack config and not worry about base64 and compute accurate line numbers from lineNumber and columnNumber fields from devtools protocol
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request