Option to write "First Load Size" data to file
See original GitHub issueFeature request
Is your feature request related to a problem? Please describe.
We’d previously used the bundlesize package in CI in order to monitor the growth of our application and prevent accidental imports of test libs, etc. With the switch to the new chunking strategy, the hash-based names of the new chunks breaks this approach (we previously just watched chunks/commons.*.js
). But the new “First Load Size” data could easily replace this functionality, if it were easily accessible (I’m not super keen on redirecting and parsing stdout).
Describe the solution you’d like
Would it be possible to add a configuration option to next.config that enabled also writing the size data to a json file such that it could be then analyzed by other tools?
Describe alternatives you’ve considered
Capturing and parsing the stdout of a yarn build command.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:6
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Text Import Wizard - Microsoft Support
Original data type If items in the text file are separated by tabs, colons, semicolons, spaces, or other characters, select Delimited. · Start...
Read more >Working with pretty big data in R
This table lists all of the packages that were tested, the time it took to read and write some sample data, and the...
Read more >Loading Data - Snowflake Documentation
Of the three options for identifying/specifying data files to load from a stage, providing a discrete list of files is generally the fastest;...
Read more >Java Program to Write into a File - GeeksforGeeks
If the content of the file is short, then using the FileWriter class to write in the file is another better option. It...
Read more >LOAD command - Db2 - IBM
The LOAD command efficiently loads large amounts of data into a Db2 table.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’d like to keep this open, it’s an interesting idea.
Stable hashes doesn’t address the issue of trying to reason about the size of a page, since we’d still have to add up the bundle parts included in each page. Something like
bundlesize
could already work with the regex-addressable page files; the problem is that each page needs an “arbitrary” collection of intermediate JS files. That data is perfectly contained in thepageInfos
data structure but not exposed post build so it can’t be used for monitoring.I know bundle size isn’t everything when it comes to speed of delivery, but it’s a pretty useful first line of defense against someone accidentally including something like
faker
outside of test files, for instance.