fix: slash in char match pattern of magic comments#10187
Conversation
✅ Deploy Preview for rspack canceled.
|
There was a problem hiding this comment.
Pull Request Overview
This PR fixes issue #10183 by updating the regex pattern used for parsing magic comments. The changes include an update to the import path in the test configuration and a refined regex in the JavaScript plugin to better handle escaped slashes, along with new tests to validate the behavior.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/rspack-test-tools/tests/configCases/runtime/get-chunk-filename-runtime/test.config.js | Updated import path to point to the production build type definition. |
| crates/rspack_plugin_javascript/src/webpack_comment.rs | Modified complex regex to correctly match magic comments with escaped slashes and added tests for verification. |
CodSpeed Performance ReportMerging #10187 will not alter performanceComparing 🎉 Hooray!
|
Summary
fix #10183
Checklist