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

Less polyfills #30

Open
rektide opened this issue May 13, 2020 · 3 comments
Open

Less polyfills #30

rektide opened this issue May 13, 2020 · 3 comments

Comments

@rektide
Copy link

rektide commented May 13, 2020

Using timesync brings in Promise.js and emitter.js, which are files which a browser will not need. It would be great to be able to use timesync without bringing in these unnecessary files.

@josdejong
Copy link
Contributor

Thanks @rektide , I think we can indeed remove Promise from the bundle.

@pip8786
Copy link

pip8786 commented Jul 20, 2020

I'm trying to use this package with a CRA + socket.io webapp, and without installing promise it fails to compile since window and window.Promise don't exist at compile time. However, they will exist at runtime in the browser so installing and requiring promise is a bit unnecessary in that case. As far as I can tell, there's no way around installing promise in an un-ejected CRA app since I can't define a bogus webpack plugin to fool the compiler.

Is there a way we could update this to have a client side package that doesn't require promise?

@josdejong
Copy link
Contributor

I think the best solution is to drop this polyfill from the library as proposed in this issue :)

Will be a breaking change so we have to publish as v2.0.0.

Help would be welcome, shouldn't be too much work.

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

3 participants