fix!: remove deprecated readResourceForScheme hook#13027
Conversation
There was a problem hiding this comment.
Pull request overview
Removes the deprecated NormalModule.getCompilationHooks(compilation).readResourceForScheme() hook from Rspack’s NormalModule compilation hooks API, aligning with webpack’s deprecation and reflecting that the hook was never actually implemented in Rspack.
Changes:
- Removed
readResourceForSchemefromNormalModuleCompilationHooksand fromgetCompilationHookshook initialization. - Deleted the internal deprecation/fake-hook plumbing that only existed to support
readResourceForScheme. - Updated the public API surface documentation (
core.api.md) to remove the hook.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/rspack/src/NormalModule.ts | Drops readResourceForScheme and the supporting fake/deprecation hook wrapper logic from the runtime API. |
| packages/rspack/etc/core.api.md | Removes readResourceForScheme from the documented API surface to match the implementation change. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Rsdoctor Bundle Diff AnalysisFound 5 projects in monorepo, 5 projects with changes. 📊 Quick Summary
📋 Detailed Reports (Click to expand)📁 react-10kPath:
📁 react-1kPath:
📁 react-5kPath:
📁 romePath:
📁 ui-componentsPath:
Generated by Rsdoctor GitHub Action |
📦 Binary Size-limit
❌ Size increased by 25.50KB from 48.65MB to 48.68MB (⬆️0.05%) |
Merging this PR will not alter performance
Comparing Footnotes
|
Summary
Remove the
NormalModule.getCompilationHooks(compilation).readResourceForScheme()hook because it was never implemented in Rspack and has been deprecated in webpack (https://github.com/webpack/webpack/blob/124ba79918269ecc6018915655c993327947ff12/lib/NormalModule.js#L289-L290).It appears that it is not used by any popular plugins: https://github.com/search?q=readResourceForScheme&type=code
Checklist