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
- Create a new app via
create-react-app
- Run
npm build
oryarn build
- Observe that
2.[hash].chunk.js
is created instead of1.[hash].chunk.js
Expected Behavior
We expected 1.[hash].chunk.js
Actual Behavior
Production build JS files are not named correctly.