首页 > 解决方案 > msal-angularv2.0.4 IE11 不能与 promise polyfill 一起使用

问题描述

我相信我们在https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-angular/docs/v2-docs/ie-support.md中提到了所有内容

我们在 index.html 的顶部包含了一个 promise polyfill:

 <script src="https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.3.4/bluebird.min.js" class="pre"></script>

但是,当尝试在 IE11 中运行 Angular 应用程序时,我们得到: Script 1002: syntax error

我们正在使用 ES5 构建应用程序,包括将 IE11 添加到 browserlist.rc,我还尝试包含所有 core-js polyfills。

也许我在 Angular 的错误位置添加了 Promise polyfill?但是,我也尝试了一个 Angular Promise polyfill 包,但它不起作用。

不知道为什么 IE11 根本没有加载,我相信这可能与 msal js 和 msal angular 有所不同?

标签: azure-active-directoryinternet-explorer-11msalpolyfillsmsal.js

解决方案


对于任何有类似问题的人:

我们将 MSAL-angular v2.0.4 与 Angular 6 一起使用。降级到 MSAL-angular v1.4.0 后,IE11 工作正常。


推荐阅读