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

Doesn't work on IE-10 and IE-11 #28

Closed
collegeimprovements opened this issue Jun 4, 2019 · 3 comments
Closed

Doesn't work on IE-10 and IE-11 #28

collegeimprovements opened this issue Jun 4, 2019 · 3 comments

Comments

@collegeimprovements
Copy link

Would it be possible to support IE-10 and IE-11 by generating target files(via tsconfig) for IE-10,11 as well as modern browsers?

Currently it gives syntax error in Internet Explorer.

@drcmda
Copy link
Member

drcmda commented Jun 4, 2019

The errors would be interesting, but probably just missing polyfills since we compile via babel-env without browser config.

Looking through the code there doesn't seem to be anything special. It's using Set, Object.keys, Object.is.

It's probably the former (Obj.id). If you add a core-js polyfill, it will surely work. Could you import zustand/cjs and try adding corejs?

@collegeimprovements
Copy link
Author

It indeed worked. Thanks a lot :)

@hibachrach
Copy link

hibachrach commented Mar 27, 2020

Not sure if I should open up another issue, so I thought I'd ping here first: is there a reason that he ES Module source isn't transpiled for IE11 as well? If I am importing this with ES Module syntax with webpack for a web target, it's going to pick up the module entry point in package.json which includes stuff like Object.assign (a non-ES Module ES6) and not transpile it. I'd then have to transpile zustand myself. Is this intended?

Some reasoning/context: webpack/webpack#1979 (comment)

EDIT: Actually, looking at the build, it doesn't seem like Object.assign or Object.is are being transpiled anywhere even though

Sorry, I was confusing transformations with polyfills. However, it might help in the README to make list of polyfills that might be necessary if targeting IE11 (as that seems to have explicit support)

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

No branches or pull requests

3 participants