-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
empty stats.json #9
Comments
Hi @opportunato Can you perhaps point me to a branch that has the empty output issue if your project is open source? If not, let's look at what the stats object actually looks like. Add a console log like this: // Write out stats.json file to build directory.
new StatsWriterPlugin({
transform: function (data) {
console.log("TODO HERE DATA", JSON.stringify(data, null, 2));
return {
main: data.assetsByChunkName.main[0],
css: data.assetsByChunkName.main[1]
};
}
}) and we can debug it further from there... |
Hi @ryan-roemer, thanks for an amazingly quick answer! And here is my data:
|
@opportunato -- can you try the following?
// Write out stats.json file to build directory.
new StatsWriterPlugin({
transform: function (data) {
return JSON.stringify({
main: data.assetsByChunkName.main[0],
css: data.assetsByChunkName.main[1]
}, null, 2);
}
}) and let me know how that goes? |
Now everything works. Thank you very much, should have checked out the documentation more thoroughly! |
Hi!
I am using 1.0.0 version, and at the end of the build process I am getting empty stats.json.
How possibly can I debug it and get the cause?
My config looks like this:
The text was updated successfully, but these errors were encountered: