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
  • Issues
  • #6698
Closed
Open
Issue created Mar 21, 2019 by Administrator@rootContributor

Build creates 2.[hash].chunk.js instead of 1.[hash].chunk.js

Created by: robcaldecottvelo

Is this a bug report?

Yes

Did you try recovering your dependencies?

This is not a dependency issue.

Which terms did you search for in User Guide?

"chunk"

Environment

  System:
    OS: macOS 10.14.3
    CPU: x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
  Binaries:
    Node: 11.12.0 - /usr/local/bin/node
    Yarn: 1.15.2 - /usr/local/bin/yarn
    npm: 6.7.0 - /usr/local/bin/npm
  Browsers:
    Chrome: 73.0.3683.86
    Firefox: 65.0.1
    Safari: 12.0.3
  npmPackages:
    react: Not Found
    react-dom: Not Found
    react-scripts: Not Found
  npmGlobalPackages:
    create-react-app: Not Found

Steps to Reproduce

We are upgrading from react-scripts 2.1.1 which used to generate a files called 1.[hash].chunk.js and 1.[hash].chunk.css. This has now changed to 2.[hash].chunk.*. While this would not be an issue for most, we are integrating with some legacy code where we are expecting 1.[hash].chunk.* to be present.

Note that 2.[hash].chunk.* contradicts the official docs here:

https://facebook.github.io/create-react-app/docs/production-build#docsNav

  1. Create a new app via create-react-app
  2. Run npm build or yarn build
  3. Observe that 2.[hash].chunk.js is created instead of 1.[hash].chunk.js

Expected Behavior

We expected 1.[hash].chunk.js

Actual Behavior

Production build JS files are not named correctly.

Assignee
Assign to
Time tracking