Skip to content
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

Shown in readme how to generate stats.json #120

Open
higimo opened this issue Oct 6, 2021 · 5 comments
Open

Shown in readme how to generate stats.json #120

higimo opened this issue Oct 6, 2021 · 5 comments

Comments

@higimo
Copy link

higimo commented Oct 6, 2021

now is riddle=)

@smelukov
Copy link
Member

smelukov commented Oct 6, 2021

You don't even need to generate stats.json
Just use webpack-plugin
But if you want to save stats somewhere, you can use saveStatsTo-option ☺️

@tony
Copy link

tony commented Feb 8, 2022

Uh oh! I don't get any output files when adding StatoscopeWebpackPlugin(), regardless of the options passed and having the right stats declared. Are there any diagnostic messages that the plugin has to indicate it starting up, is about to save a stats file, etc? I may be able to file a proper issue (or document what I did wrong so it can help someone)

[email protected], @statoscope/[email protected], node 16.13.0

But if you want to save stats somewhere, you can use saveStatsTo-option ☺️

Assuming the user doesn't enter saveStatsTo: Where would they view their stats?

@smelukov
Copy link
Member

smelukov commented Feb 9, 2022

@tony by default, if no options are specified, StatoscopeWebpackPlugin saves the HTML report into a temporary directory and opens it in your browser after the bundle is ready.
If you need to save the report into a specific directory, you could use saveReportTo-option
Also, if you need to save stats.json separately, you could use saveStatsTo-option

@tony
Copy link

tony commented Feb 9, 2022

@smelukov I wonder if the reason it's not launching a browser is I'm in WSL 2.

Is there a default file location where the browser usually opens? Does it print the URL to the console in case the browser doesn't open?

@smelukov
Copy link
Member

smelukov commented Feb 9, 2022

It does not print output file path for now. But I'll add it.
For now you could specify saveReportTo: 'report.html' to save the report into current directory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants