Skip to content

prevent calling stats.toJson() - #1910

Open
pikpok wants to merge 1 commit into
jaredpalmer:masterfrom
pikpok:prevent-stats-tojson
Open

prevent calling stats.toJson()#1910
pikpok wants to merge 1 commit into
jaredpalmer:masterfrom
pikpok:prevent-stats-tojson

Conversation

@pikpok

@pikpok pikpok commented Mar 3, 2023

Copy link
Copy Markdown

Use hasErrors/hasWarnings methods to check for errors on webpack stats, instead of always calling toJson(). Also, in case of errors use errors-only or errors-warnings stat config presets to avoid generating unnecessary stats.

In our (quite large) Razzle project, stats.toJson() call takes a lot of time and memory, and after migrating to webpack 5 even results in OOM errors on build.

@pikpok

pikpok commented May 22, 2023

Copy link
Copy Markdown
Author

@fivethreeo could you take a look? 👀 or is Razzle abandoned and there's no way of getting this merged and released? 😅

@rahulranjan-blitz

Copy link
Copy Markdown

looks good tbh.. need @fivethreeo approval

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants