You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This was originally reported as a breaking change back on Apr 25, 2019 #6904
The conversation on this thread was focused around bundle file source analysis which could rightfully be done with only using the sourcemaps. The conversation however missed the perspective that the stats.json file holds more information than just file size. The stats.json file contains a mapping between files and their dependencies. This module level dependency information is critical to understand and answer questions like:
We have done work with Rome, Rollup, and the webpack teams to expose this information. However with CRA dropping the ability to get stats.json we are now unable to provide this level of analysis to users.
Describe the solution you'd like
Expose the --stats flag again
Which can be done via a rollback of this change e7a427a
(Describe your proposed solution here.)
⭐️ ⭐️ ⭐️
I have prepared and tested this change in a PR #8790
⭐️ ⭐️ ⭐️
Describe alternatives you've considered
Only supporting CRA 2.0
Pros:
No work needed
Cons:
Makes it impossible for people using newer versions of CRA to understand their bundle size
Requiring people to manually apply a patch to react-scripts
Pros:
no work needed by the core team
Cons:
Significantly more friction for developers to do this sort of analysis
Manual patch will drift from the source code meaning a continual amount of upkeep required to the patch
The text was updated successfully, but these errors were encountered:
This commit is a manual revert of the following commits:
facebook@e7a427afacebook@140e182
And a re-introduction of
facebook@7c85938Fixes: facebook#8789Fixes: facebook#6904
Tested:
Manually ran yarn link and then ran yarn build from a 3.x version of CRA
with react-scripts linked in from this patch.
Verification:
Saw that a bundle-stats.json file was written out where as before in the
pre-linked version it was not.
Is your proposal related to a problem?
In CRA 2.X it was possible via a
--stats
flag to dump out webpack's stats.json file for further bundle analysis.This functionality was originally from:
7c85938
And then was removed via a combination of changes:
primary removal:
e7a427a
additional cleanup here:
140e182
This was originally reported as a breaking change back on Apr 25, 2019
#6904
The conversation on this thread was focused around bundle file source analysis which could rightfully be done with only using the sourcemaps. The conversation however missed the perspective that the
stats.json
file holds more information than just file size. Thestats.json
file contains a mapping between files and their dependencies. This module level dependency information is critical to understand and answer questions like:All of these are questions that we are aiming to answer with tooling like bundle-buddy. Full details and design of this here:
https://docs.google.com/document/d/1ycGVBJmwIVs34yhC0oTqv_WH5f0fs2SAFmzyTiBK99k/edit
We have done work with Rome, Rollup, and the webpack teams to expose this information. However with CRA dropping the ability to get
stats.json
we are now unable to provide this level of analysis to users.Describe the solution you'd like
Expose the
--stats
flag againWhich can be done via a rollback of this change
e7a427a
(Describe your proposed solution here.)
⭐️ ⭐️ ⭐️
I have prepared and tested this change in a PR #8790
⭐️ ⭐️ ⭐️
Describe alternatives you've considered
Only supporting CRA 2.0
Pros:
No work needed
Cons:
Makes it impossible for people using newer versions of CRA to understand their bundle size
Requiring people to manually apply a patch to react-scripts
Pros:
no work needed by the core team
Cons:
Significantly more friction for developers to do this sort of analysis
Manual patch will drift from the source code meaning a continual amount of upkeep required to the patch
The text was updated successfully, but these errors were encountered: