New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cli: Support for large webpack stats files #2118
Comments
I'm using the cli to try to generate a stats file, but I get errors like this:
My stats file is +120k lines long. Do you think it can be related to this issue? |
Update: also I should mention that my |
@fcano-uz the error you are getting is from bundle-stats validator and it means that the structure of the stats is not as expected. The webpack stats file is already loaded in order to validate it, so is not related to the size of the file.
The webpack-plugin sets its own webpack stats options when getting the data, but when generating the webpack stats using the CLI method, you need to make sure the required webpack stats options are set. If you are using a framework that sets webpack Let me know if you are still getting errors after you regenerate the webpack stats ;) |
My stats seem correct, If I log {
assets: true,
entrypoints: true,
chunks: true,
modules: true,
builtAt: true,
hash: true
} Setting I was generating the stats file this way:
I'm seeing there's also a (For reference: this is the webpack v4 docs for "stats") So even setting the My stats file has this structure: I can open a new issue if you prefer, maybe I can share the full stats file if that can be useful. For now this is a non-blocker, I'm going to use the webpack plugin. |
Yes, you are right about that! On webpack v4, the preset values are options for bundle-stats supports webpack v4, and I'm still working on a couple of webpack v4 projects where it is used as a standalone CLI or with relative-ci. In this case, I suspect a config conflict with another third-party plugin. Next, it will be interesting to see the output of the webpack stats with Let me know if you are still having problems after you try the above. If the assets are still not present, it might be helpful to try to recreate a minimal reproducible case. |
Thanks for the comment @vio Indeed using the webpack-stats-plugin fixes the stats file and makes it work again, so this looks like a plugin overriding the stats configuration. |
closed by #3420 ready for testing on |
No description provided.
The text was updated successfully, but these errors were encountered: