addyosmani / addyosmani/webpack-lighthouse-plugin

support for chrome launcher options

Offen
#19 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
JavaScript
Sterne
294
Forks
12
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

there is the need to [configure webpack dev-server to use https][1] in order to work with [service worker][2]. webpack dev-server can be configured to serve self-signed certificate. as a result, chromium needs to launched with `--ignore-certificate-errors` and `--unsafely-treat-insecure-origin-as-secure=https://localhost:8080` arguments, but there is no straightforward way to provide chromium arguments to lighthouse-plugin.

[chrome-launcher options supports `chromeFlags`][3] which is utilised by [lighthouse][4].

1. is there any way to provide the arguments for chrome-launcher?
2. is there any way to control the plugin execution only when the webpack dev-server kicks in and not for webpack in general (for instance, not to run when only bundeling takes place)?

[1]: https://webpack.js.org/configuration/dev-server/#devserverhttps
[2]: https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers#Setting_up_to_play_with_service_workers
[3]: https://github.com/GoogleChrome/chrome-launcher#launchopts
[4]: https://github.com/GoogleChrome/lighthouse/blob/master/docs/readme.md#using-programmatically

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.