js-client-sdk
js-client-sdk copied to clipboard
Consider providing ES6 builds
Is your feature request related to a problem? Please describe.
Currently, the code is compiled to ES5. This makes js-client-sdk way heavier than it needs to be. From my experiments, as much as 1/4 could be shaved off by compiling code to ES6.
Describe the solution you'd like
target: "es6"
:)
Hello @wojtekmaj,
Thank you for the request.
The main interest here is the packaged size of the SDK, correct?
Filed internally as 162092
Thank you, Ryan
Yep! You technically can use e.g. Webpack alias to rewrite imports to use src folder & build the library yourself, but I think it's too much of a hassle for most developers. Even having two builds alongside, if you don't want any breaking changes for the time being, would be a big quality of life improvement.
@kinyoklion any updates here? Looks like react sdk was already converted to ES6
Same, it would be helpful to get it compiled to ES6 so the bundle size improves. I would have expected it to be smaller in the first place
Looks like the size of the lib is growing:
As mentioned above, react SDK benefited from the switch:
although the numbers are not as impressive as @wojtekmaj's predictions maybe the result would be better for this project 🤷♂️ . Anyway, maybe compiling to ES6 is not a bad idea?