Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: prevent infinite recursion when looking for initial chunks in OutputPlugin #646

Merged
merged 3 commits into from
Jun 28, 2024

Conversation

jbroma
Copy link
Member

@jbroma jbroma commented Jun 14, 2024

Summary

Fix infinite recursion bug in OutputPlugin which might happen when chunk references itself as parent and/or child.

Closes #642
Closes #655

Remarks

Reproduced in TesterApp by limiting the chunk count:

new webpack.optimize.LimitChunkCountPlugin({
        maxChunks: 1,
}),

Test plan

  • - TesterApp no longer crashes in an exemplary scenario with LimitChunkCountPlugin

Copy link

vercel bot commented Jun 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
repack-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 28, 2024 2:43pm

Copy link

changeset-bot bot commented Jun 14, 2024

🦋 Changeset detected

Latest commit: fac17b7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@callstack/repack Patch
@callstack/repack-dev-server Patch
@callstack/repack-init Patch

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

@jbroma jbroma changed the title fix: prevent infinite recursion when looking for initial chunks fix: prevent infinite recursion when looking for initial chunks in OutputPlugin Jun 14, 2024
@jbroma jbroma marked this pull request as ready for review June 28, 2024 14:43
@jbroma jbroma merged commit 9c119db into main Jun 28, 2024
5 checks passed
@jbroma jbroma deleted the fix/output-plugin-circular branch June 28, 2024 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

build bundle mini app [webpack-cli] RangeError: Maximum call stack size exceeded
2 participants