feat: consider asset module as side-effect-free#20352
Conversation
🦋 Changeset detectedLatest commit: 288c500 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
This PR is packaged and the instant preview is available (5ecc58d). Install it locally:
npm i -D webpack@https://pkg.pr.new/webpack@5ecc58d
yarn add -D webpack@https://pkg.pr.new/webpack@5ecc58d
pnpm add -D webpack@https://pkg.pr.new/webpack@5ecc58d |
2bed3ee to
c56b046
Compare
CodSpeed Performance ReportMerging this PR will not alter performanceComparing Summary
Footnotes |
|
Looks like we need to fix tests, but code looks good |
|
We should consider a better approach for setting |
|
@hai-x Yeah, we have the same problem with renaming modules, alternative solution - make builtMeta and buildInfo as getters, but will be glad to have a hook to setup it |
This reverts commit c56b046.
|
I use |
| }) | ||
| ); | ||
| } | ||
| }); |
There was a problem hiding this comment.
What about to rewrite test to see that unused module was removed, we have __webpack_modules__ to check them in chunk
3302b9d to
54d2801
Compare
4d2a9c1 to
c3b05b6
Compare
|
Thanks for review. It such one good idea to use |
Summary
What kind of change does this PR introduce?
Fixes part of #20209.
Did you add tests for your changes?
Yes
Does this PR introduce a breaking change?
Theoretically not
If relevant, what needs to be documented once your changes are merged or what have you already documented?
No