-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add Source Map sourceRoot Support #1028
Conversation
This adds the `--sourcemap-root`, `sourcemapRoot` (JS), and `SourcemapRoot` (Go) options to insert a `sourceRoot` field in any output source maps. When a `sourceRoot` exists on the map, any sources are resolved relative to it. This is particularly useful when hosting compiled code on a server, and pointing the source files to a GitHub repo. Eg, as [AMP does](https://cdn.ampproject.org/v0.mjs.map).
Some thoughts:
|
Sure, I can make that change tonight.
I actually like that it's relative to When making npm packages, I generally don't include the Perhaps we could just create an option for |
This has been updated to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable to me! Thanks for the PR.
This adds the
--source-root
,sourceRoot
(JS), andSourceRoot
(Go) options to insert asourceRoot
field in any output source maps. When asourceRoot
exists on the map, any sources are resolved relative to it.This is particularly useful when hosting compiled code on a server, and pointing the source files to a GitHub repo. Eg, as AMP does.
Fixes #675.