Instead of starting an HTTP server, is there a way to simply output the generated HTML files (and necessary resources) into static files in a chosen folder?
This would allow us to create simple reports for each build in our CI system.
Thanks for the plugin, it's really cool! :+1:
@th0r Just started looking through the code. Would be happy to give this a shot! Let me know if there's any particular way you'd like me to approach this or if you'd rather not have this feature for some reason.
Thanks! Very excited about this plugin.
Yes, I thought about it but chose http server as it doesn't pollute fs, but I think we should support static reports as well.
The only question is shall we generate a bunch of files or inline all necessary scripts and styles into one huge report.html?
Thoughts?
To be honest I'm pretty ok with having several files.
Usually my workflow is to output reports into subfolder inside a particular folder, and then serving the index.html
e.g.: project_folder/.build/{coverage,eslint}/index.html
Output to a single file is a totally fine option too, I'm just sharing my usual workflow and opinion :)
Generating static files would be super helpful for us too as we are currently generating statistics on every pull request and make them available as a build artifact.
Implemented in v1.4.0: use analyzerMode: 'static' option.
new BundleAnalyzerPlugin({
analyzerMode: 'static',
reportFilename: path.resolve('.build/webpack/index.html')
});
Seems to work great for my use case.
Thanks a lot for your quick implementation!
I think we can close this issue now :)
Most helpful comment
Seems to work great for my use case.
Thanks a lot for your quick implementation!
I think we can close this issue now :)