Closed gyzerok closed 4 years ago
Thanks, published this as https://www.npmjs.com/package/iconv-lite-umd
@bpasero did you miss my question about source maps?
@gyzerok oh yeah I missed that. I would not want sourcemaps to be inside any of the web modules, not sure why we decided to add them for semver-umd
but I can follow up and ask.
@bpasero great! Then once you are able to confirm they are not needed I can make PRs to both libraries to fix it.
@gyzerok please go ahead with a new PR and I can review when I hear back 👍
What is the size difference?
@bpasero check “update 3” in the first post. Will supply PRs tomorrow :)
@gyzerok ah nice!
Hello @bpasero!
Here is the UMD build of
iconv-lite
as we discussed. Currently it depends on the released0.5.1
version, however building withmaster
doesn't seem to provide any benefits.The build as is results in 648KiB
I was able to shave ~40KiB by excluding
utf7
andutf32
encodings.There might be some opportunities to shave more, but I am not as well-versed in encodings topic to do that on my own without breaking something.
I will try to collaborate with the
iconv-lite
author to see how/if this can be reduced further.UPDATE 1
It looks like
cp949
is also not supported by VSCode. I've excluded it as well from the build.UPDATE 2
Since 0.6.0 is now released, I've updated to use it. Unfortunately that increased the resulting size a bit.
UPDATE 3
Thanks to the author of
iconv-lite
, who pointed out that inline source maps contribute half of the resulting size.