I am trying to run my Angular 6 dist folder on IE. It works perfectly in Chrome. IE shows title in the tab correctly but nothing on the page. I have the classlist.js and web-animations-js polyfills installed. The project works in dev but not prod. I ran ng build --prod --build-optimizer to create dist folder.
Asked
Active
Viewed 628 times
0
-
1If you open the browsers developer tools, what error is displayed? You may need to refresh the page in order to see the error. – user184994 Sep 08 '18 at 00:27
-
Dev tools in IE11 says "SCRIPT1010: Expected identifier" for each of these files: browser-sync-client.js, runtime.js, polyfills.js, and main.js – Jeoay Sep 08 '18 at 19:02
-
The issue is with compatibility mode on IE. Here's the fix: https://stackoverflow.com/questions/3449286/force-ie-compatibility-mode-off-using-tags – Jeoay Sep 10 '18 at 18:51
1 Answers
-1
Uncomment below polyfills in the polyfills.ts file then rebuild it will work.
* BROWSER POLYFILLS
*/
/** IE9, IE10 and IE11 requires all of the following polyfills. **/
import 'core-js/es6/symbol';
import 'core-js/es6/object';
import 'core-js/es6/function';
import 'core-js/es6/symbol';
import 'core-js/es6/object';
import 'core-js/es6/function';
import 'core-js/es6/parse-int';
import 'core-js/es6/parse-float';
import 'core-js/es6/number';`
import 'core-js/es6/math';
import 'core-js/es6/string';
import 'core-js/es6/date';
import 'core-js/es6/array';
import 'core-js/es6/regexp';
import 'core-js/es6/map';
import 'core-js/es6/weak-map';
import 'core-js/es6/set';
-
Thanks for your response! All of these are uncommented and it still doesn't work. It's a strange issue. It works fine in dev and on a localhost but when I try to use an external server it acts like it did before I installed and uncommented the polyfills. – Jeoay Sep 08 '18 at 18:57