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

Improve vendor chunk names in development

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/jrr/development-chunk-names into master Aug 30, 2020
  • Overview 6
  • Commits 1
  • Pipelines 0
  • Changes 1

Created by: jrr

Out of the box today, CRA produces numbered vendor chunks. They look like this in production:

File sizes after gzip:

  146.17 KB       build/static/js/7.f5a20c19.chunk.js
  39.39 KB        build/static/js/8.5cf7927d.chunk.js

And like this in development:

image

This is a good default for production, following webpack's guidance (splitChunks.name: false) to create stable, cacheable names.

In development, though, when I'm trying to understand exactly what code is delivered when, I'd like to know more about what goes in to those chunks.

This PR sets splitChunks.name to true in development, producing vendor chunk names like this:

image

Is this something others would be interested in?

Related issues: https://github.com/facebook/create-react-app/issues/4769 https://github.com/facebook/create-react-app/issues/6155 https://github.com/facebook/create-react-app/issues/6240

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/jrr/development-chunk-names