Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider providing ES6 builds #254

Open
wojtekmaj opened this issue Jul 28, 2022 · 5 comments
Open

Consider providing ES6 builds #254

wojtekmaj opened this issue Jul 28, 2022 · 5 comments

Comments

@wojtekmaj
Copy link

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" :)

@kinyoklion
Copy link
Member

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

@wojtekmaj
Copy link
Author

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.

@vitalikda
Copy link

@kinyoklion any updates here? Looks like react sdk was already converted to ES6

@adrigardi90
Copy link

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

@tniezurawski
Copy link

Looks like the size of the lib is growing:

image

As mentioned above, react SDK benefited from the switch:

image

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants