2017-08-29 89 views
0

我使用Angular 4 CLI并使用NodeJS进行构建。 在开发中,应用程序在Internet Explorer 11和当前的Chrome和Firefox上正确运行。在IE11上使用enableProdMode的角度4 CLI问题

如果我添加上了的NodeJS生产模式构建见例如,从的package.json:

"build": "ng build --prod" 

The IE 11 throws Errors on Console and the Angular App is not working. 
Script0511: Code from released script can't be executed 
polyfills.<hash>.bundle.js 

ERROR Error: Uncaught (in promise): Error: No provider for e! 
ERROR TypeError: jt(...) is undefined 

我已经激活的所有polyfills为ES6,看到错误消息appering上IE11不浏览器上的差异。

Angular Version 4.2.5 
core-js 2.5.0 (polyfills) 
uglify-js 2.8.29 (file hash) 
Internet Explorer 11.1045.10586.0 

我想使用的生产模式,因为我有块的文件名上的Java重定向名称冲突。所以功能生产模式会很好。

任何暗示,想法,指向正确的方向可能会有所帮助。

我的谷歌搜索给了我下面的结果:

angular-2-4-not-working-in-ie11

Github Issue 6695

Gitbub Issue 354

在此先感谢

回答

0

我发现角4.3版中的错误。 这会导致index.html baseurl的相对路径在IE 11上不再工作。 如果我将我的应用程序别名设置为tomcat,它会再次运行。

只能暗示我在网上找到了 https://github.com/angular/angular/issues/18176

此错误是不容易找到,并导致大量的调试成角码。

希望此消息有助于其他人,谁的生产系统被打破,夜晚时间。