-
Notifications
You must be signed in to change notification settings - Fork 304
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
List.toArray broken in IE11 #1654
Comments
This code fails in the REPL in Chromium: let xs = ["A"] |> List.toArray
printfn "%i" (Array.length xs)
Maybe it's worth noting that Fable doesn't optimize the creation of the list and the call to let xs = List.toArray ["A"]
printfn "%i" (Array.length xs) |
Well, I tested this in Chrome, Edge and IE: Comments show the results in IE11.
I stumpled upon when Thot.Json was not able to Decode fetch results (containing Lists) in Internet Explorer. I already know that finally List.toArray turns into a call to ".from" . Please note also that the REPL isn't working at all for IE11, which I don't see as important. |
You're right, this seems to be an unrelated bug in the REPL. |
I think this is related to fable-compiler/fable-react#59
Can you please try with |
|
Yeah, I know :/ Are you using "useBuiltIns": "usage" in your Babel config? Maybe polyfill.io is very convenient but if it's not working correctly it's not really an option. Maybe there's a way to load the polyfill lazily. |
I am not yet using
|
Oh, didn't know that 😮 Thanks for pointing it out! I'm always confused by the babel env options 😅 Another possibility that may work: including only the core-js polyfill for array.from and keep using polyfill.io for the rest. |
Hmm, I'm rereading the docs and it seems it's still necessary to include |
It looks to me like that is outdated doc with only true/false for the setting. The note about including it once now seems to be only for |
You're right, thank you! I've updated the webpack-config-template 👍 |
@SCullman I'll close this as this is actually not an issue with Fable, but please feel free to reopen or comment again if you've other questions :) |
Description
["A"] |> List.toArray
returns[||]
in IE11.I expect that it is not realy a fable bug, however I am not able to identify a minimum polyfill.
https://cdn.polyfill.io/v2/polyfill.js?features=es6,fetch
or..,default
is not enough.It works if I install and configure the complete
@babel/polyfill
.Related information
2.0.11
The text was updated successfully, but these errors were encountered: