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

Fetch polyfill doesn't work on IE11 #501

Closed
Viniter opened this issue Jun 18, 2019 · 3 comments
Closed

Fetch polyfill doesn't work on IE11 #501

Viniter opened this issue Jun 18, 2019 · 3 comments

Comments

@Viniter
Copy link
Contributor

Viniter commented Jun 18, 2019

Since version 3.0.0 package whatwg-fetch contains ES module export statements. The package also contains UMD build, which should be included in the legacy build instead. See discussion to this issue: JakeChampion/fetch#656

Since IE11 doesn't support ES modules, this kind of defeats the purpose of the polyfill. It essentially breaks the legacy build, which according to docs should target IE11.

The project's maintainer also recommends to...

Parse the package.json of whatwg-fetch to determine the file referenced by the main property, and serve that to browsers.

I'm using the building-webpack package and it's modern-and-legacy-config, but I have the feeling this might affect the rollup builds as well.

@LarsDenBakker
Copy link
Member

Thanks we will look into this

Viniter added a commit to Viniter/open-wc that referenced this issue Jun 18, 2019
Switch fetch polyfill script to use the UMD build (see issue open-wc#501)
Fix hashes in tests to match the new polyfill script
Rename `create-index-html` test to match the sest suit name

fixes issue open-wc#501
@Viniter
Copy link
Contributor Author

Viniter commented Jun 18, 2019

Turns out it's a pretty quick fix, I have taken the liberty of opening a PR. It seems to work in my use case.

LarsDenBakker pushed a commit that referenced this issue Jun 18, 2019
Switch fetch polyfill script to use the UMD build (see issue #501)
Fix hashes in tests to match the new polyfill script
Rename `create-index-html` test to match the sest suit name

fixes issue #501
@LarsDenBakker
Copy link
Member

Thanks for the PR

tmsns pushed a commit to tmsns/open-wc that referenced this issue Oct 16, 2019
Switch fetch polyfill script to use the UMD build (see issue open-wc#501)
Fix hashes in tests to match the new polyfill script
Rename `create-index-html` test to match the sest suit name

fixes issue open-wc#501
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

2 participants