fix(webpack/react): deduplicate lazy bundles for same file imported via different paths#2138
fix(webpack/react): deduplicate lazy bundles for same file imported via different paths#2138orionmiz wants to merge 1 commit intolynx-family:mainfrom
Conversation
🦋 Changeset detectedLatest commit: b5ab2f6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
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 |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
|
b1823d7 to
264c21c
Compare
…orted via different paths When the same file is imported via different relative paths (e.g., `./Foo.jsx` from index.jsx and `../Foo.jsx` from subdir/importer.jsx), they now produce a single bundle instead of duplicates. The fix extends the `asyncChunkName` hook to receive ChunkGroup information, allowing the ReactWebpackPlugin to normalize chunk names based on resolved module paths rather than raw import strings. Closes: lynx-family#455 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
264c21c to
b5ab2f6
Compare
(WIP)
When the same file is imported via different relative paths (e.g.,
./Foo.jsxfrom index.jsx and
../Foo.jsxfrom subdir/importer.jsx), they now producea single bundle instead of duplicates.
The fix extends the
asyncChunkNamehook to receive ChunkGroup information,allowing the ReactWebpackPlugin to normalize chunk names based on resolved
module paths rather than raw import strings.
Closes: #455
@coderabbitai summary
Checklist