Skip to content

Conversation

@karthik2804
Copy link
Collaborator

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

@karthik2804 karthik2804 marked this pull request as draft July 23, 2025 10:50
@karthik2804
Copy link
Collaborator Author

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]>
@karthik2804 karthik2804 marked this pull request as ready for review July 23, 2025 11:48
@karthik2804
Copy link
Collaborator Author

The test has been updated to use esbuild and now the precompiled-source.js.map which is generated along with precompiled-source.js map back directly to the sources chaining the one generated by the build process. Note that we do not resolve maps inside the node_modules folder as some NPM packages have sourcemaps but not the source bundled.

@karthik2804
Copy link
Collaborator Author

@tschneidereit friendly bump for a review. Thanks!

Copy link
Collaborator

@tschneidereit tschneidereit left a 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!

@karthik2804 karthik2804 merged commit 35e4b6d into spinframework:main Aug 25, 2025
11 checks passed
@karthik2804 karthik2804 deleted the sourcemap_chaining branch August 25, 2025 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants