-
-
Notifications
You must be signed in to change notification settings - Fork 724
feat: implement extractSourceMap
option
#11814
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?
feat: implement extractSourceMap
option
#11814
Conversation
✅ Deploy Preview for rspack canceled.Built without sensitive environment variables
|
fs: &Arc<dyn ReadableFileSystem>, | ||
) -> Result<Option<Content>> { | ||
let scheme = resource_data.get_scheme(); | ||
if scheme.is_none() |
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.
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
CodSpeed Performance ReportMerging #11814 will not alter performanceComparing Summary
|
@colinaaa There’s a related feature— extractSourceMap supports HTTP URLs. If there’s a future plan for it, it could be ported as well. |
Thanks! I've noticed that, too. I would like to port that in the next PRs. |
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
|
||
it("should extract source map - 1", () => { | ||
const fileData = fs.readFileSync(path.resolve(__dirname, "bundle1.js.map")).toString("utf-8"); | ||
const fileData = fs.readFileSync(__filename + ".map").toString("utf-8"); |
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.
The tests have been updated in webpack/webpack#20008.
expect(link.sheet.css).toContain("/*# sourceMappingURL=bundle0.css.map*/"); | ||
} | ||
|
||
expect(css).toMatchSnapshot(); |
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.
We cannot get correct snapshot in WASM tests. And we have different snapshot with Webpack.
@codex review |
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
@codex review |
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
@codex review |
Codex Review: Didn't find any major issues. Can't wait for the next one! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. |
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