代码之家  ›  专栏  ›  技术社区  ›  Gerald Hughes

角度AOT排除依赖项包.json基于浏览器

  •  0
  • Gerald Hughes  · 技术社区  · 6 年前

    我在使用AOT,我依赖于 package.json 这会导致IE出现一些问题,它会阻止整个应用程序。

    复制发行步骤(角度8)

    1. ng new angular-tour-of-heroes
    2. npm install peerjs
    3. ng serve --aot 
    4. open the application using Chrome
    5. open application using Internet Explorer - You can see in the console an error,
       and the fact the app breaks.
    

    https://angular.io/guide/schematics-authoring https://angular.io/guide/deployment#differential-loading

    以前有人做到这一点吗?你有一个有效的例子吗?

    将Angular 8更新为Angular 9,解决了这个问题,应用程序不再崩溃,因此在Angular 9中,问题不会重现。

    不过,问题仍然存在,如何获得和服务两个不同的版本和两个不同的版本包.json在构建中没有组件文件而没有一个包?

    0 回复  |  直到 6 年前
    推荐文章