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

Disable webpack chunk coalescing #5030

Merged
merged 3 commits into from
Sep 19, 2018
Merged

Conversation

Timer
Copy link
Contributor

@Timer Timer commented Sep 18, 2018

closes: #4977, closes #4632, closes #4769, closes #4633


Disabling chunk rollup results in much better bundle distribution.
Off topic, it also makes webpack blazing fast!

This is the recommendation made in the code splitting blog post by @sokra.

It says setting { name: false } will prevent bundle invalidation as more chunks are added, but we'll see ...

v1.1.4
Optimal chunk distribution, 65 second build time:

v2.0.0-next.a671462c
Suboptimal chunk rollup (see 1MB chunk, 91 second build time):

This PR:
Optimal chunk distribution (compare to v1, 56 second build time):

This PR + Warm Cache (39 seconds!!!):

@sjsyrek
Copy link

sjsyrek commented Sep 19, 2018

Thank you for this!

This reverts commit 84632115d178b48e08eb75dc5e9a921ece6aa759.
@Timer Timer force-pushed the feature/fix-chunking branch from 8463211 to 77f60ed Compare September 19, 2018 12:38
@audiolion
Copy link

Excellent stuff Timer!

@Timer
Copy link
Contributor Author

Timer commented Sep 19, 2018

We'll figure CI out another time ...

@Timer Timer merged commit d555256 into facebook:next Sep 19, 2018
@Timer Timer deleted the feature/fix-chunking branch September 19, 2018 13:44
@sokra
Copy link

sokra commented Sep 19, 2018

Note name: true is also an option. It's similar to name: false but will add generated names like vendors~main~chunkA~chunkB for vendors shared between these 3 chunks.

@Timer
Copy link
Contributor Author

Timer commented Sep 19, 2018

The Medium article made it sound like this would cause unnecessary cache invalidation, but I think we'd rather have the smaller names anyway.

Thanks @sokra!

zmitry pushed a commit to zmitry/create-react-app that referenced this pull request Sep 30, 2018
* Disable webpack chunk rollup

* Bump timeout

* Revert "Bump timeout"

This reverts commit 84632115d178b48e08eb75dc5e9a921ece6aa759.
GabeDuarteM added a commit to GabeDuarteM/gd-scripts that referenced this pull request Oct 29, 2018
@lock lock bot locked and limited conversation to collaborators Jan 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants