0

I using Angular 4 CLI and using NodeJS for building. On development the app running correct on Internet Explorer 11 and current Chrome and Firefox.

If I add the Production Mode on NodeJS Build see example from package.json:

"build": "ng build --prod"

Following error message appering on IE11

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

I already activated all polyfills for es6 and see no difference on the browser.

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

I want to use the production mode because I have a name conflict with the chunk filenames on java redirects. So a functional-production mode would be great.

Any hint, idea, pointing to right direction could be helpful.

My google search gave me following results:

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

Github Issue 6695

Gitbub Issue 354

Thanks in advance

Gerlando Caldara
  • 313
  • 1
  • 3
  • 10

1 Answers1

0

I found a bug on angular version 4.3 . That cause relative path of index.html baseurl not working any more on IE 11. If I set my app alias of tomcat it working again.

Only hint I found on the net was https://github.com/angular/angular/issues/18176

This error is not easy to find and cause a lot of debugging into angular code.

Hope this message helps other, who production system is broken and the hours into the night.

Gerlando Caldara
  • 313
  • 1
  • 3
  • 10