0

I have an Angular application which is not working on IE11 only.

I have set up 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/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";
import 'core-js/es6/promise';

import 'core-js/es7/object';
import 'core-js/es7/array';

/** IE10 and IE11 requires the following for NgClass support on SVG elements */
import "classlist.js"; // Run `npm install --save classlist.js`.

/** IE10 and IE11 requires the following for the Reflect API. */

// Evergreen browsers require these.
import 'core-js/es6/reflect';
import 'core-js/es7/reflect';

But IE11 (and no other browser) gives syntax error in vendor.js as SCRIPT1003: Expected ':'.

How to resolve this error?

5
  • probably a third party library giving you this issue Commented Jul 6, 2020 at 10:15
  • Yes may be but didn't identify which library caused an issue. I have used socket io, web rtc etc library . Commented Jul 6, 2020 at 11:51
  • Can you post the dependencies in your package.json? Commented Jul 6, 2020 at 12:11
  • 1
    Look at the IE11 console, it should show you the line of the compiled package causing issue
    – geauser
    Commented Jul 6, 2020 at 13:01
  • I suggest trying to check whether the vendor.js properly transpiled or not. If possible then try to inform us how did you add the vendor.js in your project and how it gets transpiled? Try to post the content of the package.json file may help to get an idea about the issue. Commented Jul 7, 2020 at 1:52

0