Repository navigation
refactor: move dll related code to dll directory - #20868
alexander-akait merged 4 commits into
Conversation
|
|
This PR is packaged and the instant preview is available (235a160). Install it locally:
npm i -D webpack@https://pkg.pr.new/webpack@235a160
yarn add -D webpack@https://pkg.pr.new/webpack@235a160
pnpm add -D webpack@https://pkg.pr.new/webpack@235a160 |
Codecov Report❌ Patch coverage is
❌ Your patch status has failed because the patch coverage (67.34%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #20868 +/- ##
==========================================
+ Coverage 80.69% 82.34% +1.64%
==========================================
Files 528 529 +1
Lines 53747 53795 +48
Branches 14189 14193 +4
==========================================
+ Hits 43372 44297 +925
+ Misses 10375 9498 -877
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Refactors webpack’s DLL-related implementation into a dedicated lib/dll/ area and exposes DLL plugins under a new webpack.dll namespace, aligning consumption with the public compiler.webpack.* surface.
Changes:
- Added
exports.dllnamespace to TypeScript types and a correspondingdllscope on the main JS export object. - Updated DLL plugin/module implementations to use correct relative imports after moving into
lib/dll/. - Updated internal serializer registration entries for moved DLL modules.
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
types.d.ts |
Adds exports.dll namespace and adjusts export placement for DLL plugins. |
lib/util/internalSerializables.js |
Moves serializer loader entries for DLL modules to dll/* keys. |
lib/index.js |
Adds dll scope and routes DLL plugin getters to ./dll/*. |
lib/dll/LibManifestPlugin.js |
Fixes relative imports after moving under lib/dll/. |
lib/dll/DllReferencePlugin.js |
Fixes relative imports and schema require paths after move. |
lib/dll/DllPlugin.js |
Fixes relative imports and schema require paths after move. |
lib/dll/DllModuleFactory.js |
Fixes relative imports/types after move. |
lib/dll/DllModule.js |
Updates imports and changes serialization request id to webpack/lib/dll/DllModule. |
lib/dll/DllEntryPlugin.js |
Fixes dependency imports/types after move. |
lib/dll/DelegatedPlugin.js |
Fixes dependency import/types after move. |
lib/dll/DelegatedModuleFactoryPlugin.js |
Fixes typedef import paths after move. |
lib/dll/DelegatedModule.js |
Updates imports and changes serialization request id to webpack/lib/dll/DelegatedModule. |
Comments suppressed due to low confidence (2)
lib/dll/DllModule.js:184
- Changing the
makeSerializablerequest fromwebpack/lib/DllModuletowebpack/lib/dll/DllModulechanges the serialization identifier for this class. That will make existing persistent caches (e.g. filesystem cache packs) from earlier builds fail to deserialize withNo deserializer registered...errors, even if they would otherwise be invalidated by build dependency snapshots. Consider keeping the original request string for backward compatibility (and just updateinternalSerializablesto require the new file location), or provide a compatibility layer that still registers/deserializes the old request id.
lib/dll/DelegatedModule.js:290 - Changing the
makeSerializablerequest fromwebpack/lib/DelegatedModuletowebpack/lib/dll/DelegatedModulechanges the serialization identifier for this class and can break deserialization of existing persistent caches (filesystem cache packs) created with older builds. To avoid cache restore failures, consider keeping the original request string and updatinginternalSerializablesto point to the new module location (or otherwise maintaining backward-compatible deserialization for the old request id).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
b21b511 to
b82500f
Compare
Types CoverageCoverage after merging refactor-structure-move-dll-related-code-to-dll-directory into main will be
Coverage Report
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Summary
refactor - improve inner structure, note
dllplugins should be consumed fromcompiler.webpack.DllPlugin, not usingrequire("webpack/lib/DllPlugin"), the last is not public APIWhat kind of change does this PR introduce?
refactor
Did you add tests for your changes?
Existing
Does this PR introduce a breaking change?
Described above, it is not a public API
If relevant, what needs to be documented once your changes are merged or what have you already documented?
No need
Use of AI
No