lighthouse-plugin-co2

Lighthouse Plugin that estimates the CO2 released to the atmosphere for the analysed page. Using information of the energy grid of several countries (carbon intensity) and the transferred data over the network.

Usage no npm install needed!

<script type="module">
  import lighthousePluginCo2 from 'https://cdn.skypack.dev/lighthouse-plugin-co2';
</script>

README

Lighthouse Plugin CO2

Lighthouse Plugin that estimates the CO2 released to the atmosphere for the analysed page. Using information of the energy grid of several countries (carbon intensity) and the transferred data over the network.

Overall, the less you transfer, the better the score.

To run as a plugin user

  1. Install lighthouse (v5+) and the plugin lighthouse-plugin-co2, likely as devDependencies.
    • npm install -D lighthouse lighthouse-plugin-co2
  2. To run your private lighthouse binary, you have three options
    1. npx --no-install lighthouse https://example.com --plugins=lighthouse-plugin-co2 --view
    2. yarn lighthouse https://example.com --plugins=lighthouse-plugin-co2 --view
    3. Add an npm script calling lighthouse and run that.

Result

Screenshot of report with plugin results