Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Merge requests
  • !2648

Warn about large bundle sizes

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/gaearon/bundle-size into master Jun 27, 2017
  • Overview 6
  • Commits 1
  • Pipelines 0
  • Changes 2

Created by: gaearon

We now have docs both about code splitting and about analyzing bundles so seems like a good time.

The limits are very liberal IMO. For the vast majority of apps it's possible to fit the main bundle into 512k gzipped, and 1M gzipped for individual chunks. If that doesn't fit you, you might as well need to eject for other reasons (e.g. too slow builds that need fine tuning with HappyPack or similar).

The warning looks like this: screen shot 2017-06-27 at 23 23 29

In the screenshot I hardcoded it to show the message (to test it), but in practice it will only appear for main bundles > 512k gzipped, and for chunks > 1m gzipped.

This partially alleviates the problem https://github.com/facebookincubator/create-react-app/pull/2645 is hiding. Perf sensitive users will probably notice this. We still don't address the issue in https://github.com/facebookincubator/create-react-app/issues/2612 specifically but there's no way for us to know if the person has opted out of using service workers, so I don't think we can be more detailed there.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/gaearon/bundle-size