-
-
Notifications
You must be signed in to change notification settings - Fork 757
fix: relative-resource-path should handle output.filename #12398
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
Conversation
✅ Deploy Preview for rspack canceled.
|
|
📝 Benchmark detail: Open task failure |
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.
Pull request overview
This PR fixes the handling of output.filename placeholders in source map generation when using the [relative-resource-path] template. Previously, the source map path resolution didn't account for subdirectories in the output filename (e.g., static/js/[name].js), resulting in incorrect source map file paths.
Key Changes:
- Modified
get_unresolved_source_map_pathto resolve the source map filename template with the actual asset filename, ensuring source maps are placed in the correct directory structure - Changed the function from synchronous to asynchronous to support template rendering
- Updated test configuration to verify the fix works with nested output paths
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
crates/rspack_plugin_devtool/src/source_map_dev_tool_plugin.rs |
Updated get_unresolved_source_map_path to accept asset filename and render templates, converting from sync to async function |
tests/rspack-test/configCases/source-map/relative-resource-path/rspack.config.js |
Added filename: 'static/js/[name].js' to test nested output paths and updated source map path expectation |
tests/rspack-test/configCases/source-map/relative-resource-path/test.config.js |
Added findBundle configuration to locate the generated bundle in the nested directory structure |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Rsdoctor Bundle Diff AnalysisFound 5 project(s) in monorepo. 📁 react-10kPath:
📁 react-1kPath:
📁 react-5kPath:
📁 ui-componentsPath:
📁 romePath:
Generated by Rsdoctor GitHub Action |
📦 Binary Size-limit
❌ Size increased by 1.38KB from 47.71MB to 47.72MB (⬆️0.00%) |
CodSpeed Performance ReportMerging #12398 will not alter performanceComparing Summary
|
|
📝 Benchmark detail: Open
|
Summary
This PR fixes the handling of
output.filenameplaceholders in source map generation when using the[relative-resource-path]template. Previously, the source map path resolution didn't account for subdirectories in the output filename (e.g.,static/js/[name].js), resulting in incorrect source map file paths.Related links
Checklist