Closed wojtekmaj closed 2 years ago
Good catch, thanks for the suggestion. We were just gearing up to give the React SDK a little attention, I'll add this to the list!
By my testing this knocks off a little under 2kb (compressed), which isn't bad, and I will try to work this into a release. Mind if I ask what your experimental method is for getting nearly 1/4? I'm just going by npm pack
s output, which may be naive.
This went out in 2.27. Managed to shave off just over 1kb zipped, not as much as I'd hoped, but not nothing.
A good chunk of react-client-sdk size is js-client-sdk, so I would expect further improvements to follow.
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"
:)