-
Notifications
You must be signed in to change notification settings - Fork 19
add ability to generate chained sourcemap for precompiled sources #372
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Karthik Ganeshram <[email protected]>
46745c1
to
6ebf68f
Compare
Converting to draft to fix up a couple of alignment issues. |
This commit fixes updating the sourcemap comment to point to the right file. It also updates the test to use esbuild instead of webpack as the sourcemaps generated by esbuild are friendlier without webpack speicif protocol representing files. As we move to esbuild, the existing webpack plugin is modified to suit esbuild as well. Signed-off-by: Karthik Ganeshram <[email protected]>
The test has been updated to use esbuild and now the |
Signed-off-by: Karthik Ganeshram <[email protected]>
@tschneidereit friendly bump for a review. Thanks! |
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.
Apologies for the delay!
build.onLoad({ filter: /node_modules/ }, args => { | ||
return { | ||
contents: fs.readFileSync(args.path, 'utf8') | ||
+ '\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIiJdLCJtYXBwaW5ncyI6IkEifQ==', | ||
loader: 'default', | ||
} | ||
}) |
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.
Not blocking anything, but it'd be nice to have a comment here explaining how this test works: I have no idea how it does, myself :)
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.
Updated with a comment. But this basically stubs sourcemaps references by npm packages to avoid issues where the sourcemap refer to files not included in the package.
f9a5288
to
aae515c
Compare
Signed-off-by: Karthik Ganeshram <[email protected]>
aae515c
to
3222e92
Compare
This PR adds the capability to the build tooling to chain the source map for the precompiled source with the input source map, allowing for better debugging.
In a follow-up PR, the plan is to move to build instead of webpack because the source maps generated by build are friendlier.
cc: @itowlson