addyosmani / webpack-lighthouse-plugin

A Webpack plugin for Lighthouse
Apache License 2.0
290 stars 12 forks source link

Run lighthouse with `view` option to immediately open the HTML report in your browser #14

Closed kevinfarrugia closed 5 years ago

kevinfarrugia commented 6 years ago

When using Lighthouse in the CLI, it is possible to view the HTML report directly in the browser using --view. Is it possible to include the same functionality on this plugin?

evenstensberg commented 6 years ago

Depends on which type of module lighthouse exposes: https://github.com/GoogleChrome/lighthouse/blob/master/docs/readme.md#using-programmatically

It should work, at least from a initial point of view. Seems to be docs missing to add lighthouse flags instead of chrome flags though.. @patrickhulce any input?

You could create your own config to audit with though. I don't think we support that, so let's wait to hear from Patrick.

patrickhulce commented 6 years ago

Lighthouse is unifying many of the CLI flags to be available from node module in v3, but --view isn't one of them. It should be fairly easy to implement on the plugin side though, it really comes down to just a few lines

kevinfarrugia commented 6 years ago

OK understood. Does it make sense to wait for v3 then?

evenstensberg commented 5 years ago

I think this is fixed, comment if not.