Closed pantro14 closed 5 years ago
We're having this exact issue as well and would like to know a solution.
Fix coming soon? https://github.com/ionic-team/stencil/pull/1720/files
@dgibson666 I see a new version 1.1.6 that fixes this bug: Bug - polyfill: ensure window context w/ fetch polyfill https://github.com/ionic-team/stencil/blob/master/CHANGELOG.md
No, I think that is different. The PR above has not yet been merged. And this issue is not marked fixed. Am I wrong? Is the issue gone for you in 1.1.6?
This PR should fix how we apply the promise polyfill in webpack setups: https://github.com/ionic-team/stencil/pull/1720
but it requires the promise polyfill to be applied manually by the user if IE11 is supported
@manucorporat thank for your reply, I'm updating version to 1.1.7, and also added
applyPolyfills().then(() => { defineCustomElements(window); });
in my main.ts file in Angular 7 app.
@dgibson666 have you tried the new version? for me it doesn't work either.
I fixed the issue removing import 'zone.js/dist/zone'
and placing it into the main.ts file after bootstrapping the app:
import { AppModule } from './app/app.module'; import 'zone.js/dist/zone'; // Included with Angular CLI.
I also installed core-js polyfills https://github.com/zloirock/core-js The component is now shown in IE11 withou problems:
Stencil version:
I'm submitting a: [x ] bug report [ ] feature request [ ] support request
Current behavior: When I run the web component on an angular7 project in IE11, the following issue happens. Zone.js has detected that ZoneAwarePromise
(window|global).Promise
has been overwritten. Most likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)if I remove the web component the app loads perfectly.
Expected behavior: the app starts normally showing the web component
Steps to reproduce:
Other information: This issue is only happening in IE11