Skip to content

Conversation

colinaaa
Copy link
Collaborator

@colinaaa colinaaa commented Oct 6, 2025

Summary

Port webpack/webpack#19824.

A new extractSourceMap option has been added to extract existing source map data from files.

This is used to replace source-map-loader.

Related links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copy link

netlify bot commented Oct 6, 2025

Deploy Preview for rspack canceled.

Built without sensitive environment variables

Name Link
🔨 Latest commit dc7becc
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/68e38744c583eb0008d27fc3

@github-actions github-actions bot added the release: feature release: feature related release(mr only) label Oct 6, 2025
Comment on lines +5 to +6
webpack:///./external-source-map.txt,
webpack:///./extract2.js,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a little different with webpack.

We don't have:

  "webpack:///external node-commonjs \\"fs\\"",
  "webpack:///external node-commonjs \\"path\\"",
  "webpack:///webpack/bootstrap",

See: https://github.com/webpack/webpack/pull/19824/files#diff-de61f5c1c819fec0a01a522d41e75824ba8e13f758920980349790b701ebe95cR11339

/*# sourceMappingURL=bundle0.css.map*/,
/*!*****************!*\\
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a little different with webpack.

Webpack only have one CSS, but we've got two.

See: https://github.com/webpack/webpack/pull/19824/files#diff-de61f5c1c819fec0a01a522d41e75824ba8e13f758920980349790b701ebe95cR11366

fs: &Arc<dyn ReadableFileSystem>,
) -> Result<Option<Content>> {
let scheme = resource_data.get_scheme();
if scheme.is_none()
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is moved from crates/rspack_loader_runner/src/runner.rs, which is the same as webpack: https://github.com/webpack/webpack/blob/9f98d803c0c5011188901e895a7060ab06e12f80/lib/schemes/FileUriPlugin.js#L39-L48

Copy link

codspeed-hq bot commented Oct 6, 2025

CodSpeed Performance Report

Merging #11814 will not alter performance

Comparing colinaaa:colin/1006/extract-source-map (dc7becc) with main (901141d)

🎉 Hooray! codspeed-rust just leveled up to 2.7.2!

A heads-up, this is a breaking change and it might affect your current performance baseline a bit. But here's the exciting part - it's packed with new, cool features and promises improved result stability 🥳!
Curious about what's new? Visit our releases page to delve into all the awesome details about this new version.

Summary

✅ 17 untouched

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release: feature release: feature related release(mr only)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: Add support for extractSourceMap
1 participant