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
  • !7633

Disable babel-loader's cacheCompression

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/jleclanche/master into master Sep 03, 2019
  • Overview 6
  • Commits 1
  • Pipelines 0
  • Changes 1

Created by: jleclanche

Context: #6846 (closed) - I received no feedback on it, so I figure a PR is more actionable.

Changes have been tested running on a live website since I filed the issue. Build times and their memory consumption have both decreased with no further issue arising.


cacheCompression is an enabled-by-default flag in babel-loader, which gzips the babel-loader cache.

Most projects do not actually benefit from cache compression, especially in production where builds often happen in a CI environment where memory is precious and disk space is not.

Furthermore, having it disabled in dev and enabled in prod means caching won't be shared between dev and prod.

Finally, the disk space savings are not that great. Most React projects will have a lot of small files (one file per component). babel-loader caches each file as a unit, so the compression overhead increases when the project is mainly lots of small files.

For these reasons, we're disabling cache compression.

Closes #6846 (closed)

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/jleclanche/master