2017-08-29 44 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

此錯誤是不容易找到,並導致大量的調試成角碼。

希望此消息有助於其他人,誰的生產系統被打破,夜晚時間。