Add support for es5 target build. IE 11 support
Closed this issue · 5 comments
Hi,
Could you please add support for es5 target. I have successfully incorporated the library. I must say its a awesome library but i am looking for es5 support.
My platform and Micro front end both support target es5
Please help. I want to run on iE 11
Hi!
Good point, I'll look into ES5 support, that sounds like something multiple people will run into.
However, regarding Angular Elements with IE 11, you might still run into issues like described here: https://stackoverflow.com/a/55338747/3699131
Angular Elements does not properly support IE 11 since it's based on a custom elements standard that's not implemented in IE 11: https://angular.io/guide/elements#browser-support-for-custom-elements
When we tried supporting IE 11 in one of our applications using Angular elements, we ran into a dead end where the change detection was not working properly.
Hi ,
I have setup my micro front end with IE 11 support. By building both mfe and platform on es5 as well as proving ngzone into window object so both application can access them.
Like (window as any ).ngzone = this.ngzone under appModule constructor of platform app
I see 👍
Regarding ES5 support, it looks like Angular has deprecated the ESM5 and FESM5 formats (https://v9.angular.io/guide/deprecations#esm5-and-fesm5-code-formats-in-angular-npm-packages) and as a consequence ng-packagr does not provide an option to build it anymore (ng-packagr/ng-packagr#1732 (comment)).
They also mention that this should not affect the usage since the ESM2015 and FESM2015 code can be transpiled on demand to ES5 in a project using a ES6 library. I assume one of the tools to achieve this is Babel (https://babeljs.io/). Is this an option for you in your setup?
@fboeller Thanks for your reply, this means a lot .
But I don't have any scope for Babel transpiler as an option, this is an existing project which currently running IE11 but now its becoming Shell for an MFE which creating problem for my use case. I understand IE is not detecting any change even after polyfills has been added. Please guide me on what approach should I take.
Just for info:- I am working on Angular 9
Unfortunately, I don't have any more insight into that than you have. In my company, we decided to drop IE support for new features as a consequence of IE not detecting changes within web components. For existing features, we decided to drop IE support together with the date Microsoft is dropping support (I think end of June).
If that's not an option in your case, I'm afraid I don't think I can offer any more advice.