feat: calculate emissions from page speed results#10
Closed
jonoliver wants to merge 0 commit into
Closed
Conversation
f569f90 to
caddabd
Compare
|
📦 Extension packages built successfully! |
caddabd to
a6d43f8
Compare
1af9ab6 to
17fbcdc
Compare
jonoliver
commented
Dec 2, 2025
| } | ||
|
|
||
| module.exports = { bundleCarbonCalculator }; | ||
|
|
Member
Author
There was a problem hiding this comment.
We didn't have anything bundling our js for the browser, and this is the first time that we're importing a 3rd party npm package @tgwf/co, e.g:
import { co2 } from "@tgwf/co2";
Since deps from node_modules weren't being bundled, trying to import resulted in this error when running the extension in the browser: TypeError: Failed to resolve module specifier "@tgwf/co2".
This is kind of a quick and dirty solution that just bundles the carbon calculator with the underlying dependency. We could probably improve this by bundling each entry point js file along with their underlying deps, but that's bigger than the scope of this PR.
17fbcdc to
d127d73
Compare
rise-erpelding
approved these changes
Jan 13, 2026
d127d73 to
98c8b55
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TODO
Validation
npm run buildEmissions Calculation Results: {bytesTransferred: 1899035, totalCO2: 0.28143698699999997}