-
Notifications
You must be signed in to change notification settings - Fork 183
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
This code cannot be converted from ES6. extending native class: Array #22
Comments
So I read the technical notes and realized that this was purposeful. I'm actually trying to use this in ClojureScript, so I'll use this issue to document how I can get it to work using ClojureScript and shadow-cljs. |
Yes, Pt extends Float32Array so that we can keep all the native functions while adding new ones. Last I tried builtin-extend babel plugin and have some success, but I couldn't get it to work with React if I remember correctly. Also modern browsers support es6 so I decided to keep it as is. Maybe now it's time to revisit. Your use case is very interesting! It would be awesome if you can share your progress and learnings here. Does ClojureScript require es5? |
It doesn't require ES5 but it is the default. For those that might be finding this later, I was able to get it work with the shadow-cljs v2.4.33 compiler using the following option in my build config:
I think that similar would work with the vanilla CLJS compiler. I'm having some other issues (i'm also using React) but I'll open another issue for that 😉 |
Thanks @Lokeh . Yes, the React example is having issues. I'll try to fix it as soon as possible. |
You could try adding |
Trying to run this in a Google Closure context (compiling to ES5), I'm running into this error when I install and import it via NPM, then compile it:
Is there a way that you could provide an ES5-compatible bundle?
The text was updated successfully, but these errors were encountered: