Code Monkey home page Code Monkey logo

Comments (12)

alfonsogarciacaro avatar alfonsogarciacaro commented on July 19, 2024 3

After a lot of debugging it seems the problem comes from polyfill.io as their Array.from replacement is not working properly in IE11 for some reason. If you remove this line in the HTML, and replace it with the following, it should work:

<script src="https://cdnjs.cloudflare.com/ajax/libs/core-js/2.5.3/core.min.js"></script>

<!-- This is only necessary if your app uses `fetch` -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/fetch/2.0.3/fetch.min.js"></script>

Could you please check and confirm if the solution works for you?

from fable-react.

toburger avatar toburger commented on July 19, 2024 2

I can confirm that by using your polyfill suggestion everything works!
Sadly default doesn't work.

from fable-react.

alfonsogarciacaro avatar alfonsogarciacaro commented on July 19, 2024 1

Unfortunately I don't know what's the problem exactly but maybe we can report an issue so they're aware of it.

from fable-react.

alfonsogarciacaro avatar alfonsogarciacaro commented on July 19, 2024 1

It seems it's already been reported: https://github.com/Financial-Times/polyfill-service/issues/1434

from fable-react.

alfonsogarciacaro avatar alfonsogarciacaro commented on July 19, 2024

Thanks! I actually had the same problem in one of my projects and was investigating this. You saved a lot of time :) I'll try to release a fix as soon as possible 👍

from fable-react.

MangelMaxime avatar MangelMaxime commented on July 19, 2024

I think some people reported that by using default in the polyfill setting problems where solve for IE11:

<script src="https://cdn.polyfill.io/v2/polyfill.js?features=default,fetch"></script>

I am not sure about that, and don't have access to an IE11 browser to test it.

from fable-react.

toburger avatar toburger commented on July 19, 2024

I wonder why Array.from is causing troubles.
I'm using Array.from from polyfill.io in another project (written in TypeScript) and the project runs in IE11 flawlessly.

from fable-react.

alfonsogarciacaro avatar alfonsogarciacaro commented on July 19, 2024

Maybe it's not Array.from by itself but a combination of that and Iterables. In Fable 1 lists are implemented using a custom List class that contains the [Symbol.iterator]. This is converted fine to an array in Chrome & friends, but apparently polyfill.io doesn't give enough juice to IE11 to perform this operation ¯_(ツ)_/¯

from fable-react.

toburger avatar toburger commented on July 19, 2024

Should I close the issue?
The dotnet new template uses still polyfill.io I guess, so people using that as a starting point are having the same issues...

from fable-react.

forki avatar forki commented on July 19, 2024

can we please fix the templates then? care to send a PR?

from fable-react.

alfonsogarciacaro avatar alfonsogarciacaro commented on July 19, 2024

The problem we have right now with the templates is there's a lot of fragmentation, we can "fix" this in the simple template but then there's the elmish template, the fulma template, SAFE template, etc. We need to find an easy way to propagate these changes through several places, which has been discussed in several places but I'm not sure yet which is the best solution. Probably putting scripts and related files in an npm package and make templates download it (there's an attempt for that in the fable-scripts repo).

We also need to decide if we want to recommend adding the polyfill with a script tag (as seen above) or importing them in code as in the SAFE bookstore.

from fable-react.

zaaack avatar zaaack commented on July 19, 2024

The polyfills of polyfill.io are hosted on GitHub, if we know which part causes this maybe we can fix it in polyfill.io?

https://github.com/Financial-Times/polyfill-service/blob/master/polyfills/Array/from/polyfill.js

from fable-react.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.