Closed fershad closed 1 year ago
Does it reduce the size by much ?
I was under the impression that debug was quite a small library, and being able to switch on debugging turns out to be quite helpful.
To be fair it we might not need as much as before - if we having some newer updated tests might make it easier to let of it.
It currently accounts for ~30% of our minified bundle size. https://bundlephobia.com/package/@tgwf/co2@0.11.3
hey @mrchrisadams and @fershad.
It seems debug really isn't used. Removing entirely seems to have no functional effect but has a 30k impact on the IIFE/Browser build.
Want a PR?
/co2.js$ du -h --max-depth=1 ./dist/
166K ./dist/cjs
41K ./dist/esm
108K ./dist/iife
315K ./dist/
/co2.js/dist$ du -h --max-depth=1 ./dist/
165K ./cjs
41K ./esm
76K ./iife
282K .
Good idea fish, let's get rid of it 👍
Currently the
debug
package is shipped as a project dependency. It looks as though it is being used to sanity check results in from the hosting checks.Could these be moved out to another file, a test, or put behind a flag? In that way, we can move
debug
intodevDependencies
and reduce the package size for this library.