I was just checking out the bundle size of js-lnurl and noticed that aes-js makes up more than half of it, but is only optionally used in an exported helper decipherAES which may not be relevant to all users of the library since it's only for LUD-10, or it may only be relevant in certain parts of people's applications and could be split into a separate chunk.
This should be easily remedied by removing the export * from index, and just requiring people to grab individual helpers from import { deciperAes } from 'js-lnurl/lib/helpers. Alternatively you could look into making the library more tree-shake friendly, although I'm not sure if that'll work or not since I don't believe aes-js is tree-shake friendly either.
Hopefully this shaves ~38kb off of most people's bundles!
I was just checking out the bundle size of
js-lnurl
and noticed thataes-js
makes up more than half of it, but is only optionally used in an exported helperdecipherAES
which may not be relevant to all users of the library since it's only for LUD-10, or it may only be relevant in certain parts of people's applications and could be split into a separate chunk.This should be easily remedied by removing the
export *
from index, and just requiring people to grab individual helpers fromimport { deciperAes } from 'js-lnurl/lib/helpers
. Alternatively you could look into making the library more tree-shake friendly, although I'm not sure if that'll work or not since I don't believeaes-js
is tree-shake friendly either.Hopefully this shaves ~38kb off of most people's bundles!