0

The child module houses the development to be deployed, so it should be understood that the 2 Angular projects should be configured independently.

enter image description here enter image description here

I have followed the steps to support internet explorer, but I only get the error of

SCRIPT1002: Syntax error vendor.js (95940,1)

The files and the modified ones made (same to child and parent):

-- Go to tsconfig.json and use target: "es5" instead of "target": "es2015".

{
  "compileOnSave": false,
  "compilerOptions": {
    "baseUrl": "./src/",
    "outDir": "./dist/out-tsc",
    "sourceMap": true,
    "declaration": false,
    "module": "esnext",
    "moduleResolution": "node",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "importHelpers": true,
    "target": "es5",
    "typeRoots": [
      "node_modules/@types"
    ],
    "lib": [
      "es2018",
      "dom"
    ]
  },
  "include": [
    "**/*.ts",
    "./node_modules/child-module",
  ]
}

-- Go to polyfills and uncomment lines and npm install --save 'classlist.js' and 'web-animations-js'

/** IE9, IE10 and IE11 requires all of the following polyfills. **/
import 'core-js/es/symbol';
import 'core-js/es/object';
import 'core-js/es/function';
import 'core-js/es/parse-int';
import 'core-js/es/parse-float';
import 'core-js/es/number';
import 'core-js/es/math';
import 'core-js/es/string';
import 'core-js/es/date';
import 'core-js/es/array';
import 'core-js/es/regexp';
import 'core-js/es/map';
import 'core-js/es/weak-map';
import 'core-js/es/set';

import 'classlist.js';

import 'core-js/es/reflect';

import 'web-animations-js';

import 'zone.js/dist/zone';
import 'whatwg-fetch';

In the package they are installed as "classlist.js": "^1.1.20150312" ; "mdn-polyfills": "^5.20.0"

-- And finally, uncomment the line for IE 9-11 support of browserslist file.

> 0.5%
last 2 versions
Firefox ESR
not dead
IE 9-11
JRR
  • 45
  • 1
  • 1
  • 6
  • What version of Angular are you using? I'm not sure if the browserslist file configuration you provided is complete. Did you import `zone.js/dist/zone`? Simply refer to [this blog](https://dev.to/coly010/angular-how-to-support-ie11-4924). – Xudong Peng Nov 03 '21 at 09:13
  • Ok, edited code of my ask. Reading about the blog ... I see that I have done everything the same, but with a difference: in my file I write IE 9-11 instead of IE 11 (for example). – JRR Nov 03 '21 at 11:57
  • As I asked, what version of Angular are you using? There are differences in configuration between different versions. For example, Angular 8 has made the default target `es2015` instead of `es5`. Just refer to this [similar case](https://stackoverflow.com/questions/55047818/angular-ie11-not-working-getting-script1002-syntax-error). In addition, can you provide complete error information, which may be able to help solve the problem. – Xudong Peng Nov 04 '21 at 07:59
  • Sorry @XudongPeng for having responded erroneously. My version is 9.1.13. – JRR Nov 04 '21 at 11:38
  • In relation to this... [Stack](https://stackoverflow.com/questions/60298210/angular-site-is-not-working-in-microsoft-ie), do I have to throw in the towel? – JRR Nov 04 '21 at 12:36
  • Please try to created a new tsconfig.json, update angular.json configuration, edit browserslist then run this command : `ng serve --configuration es5`. Refer to [this case](https://stackoverflow.com/questions/62918435/angular-9-application-not-running-on-ie11). Does it work? – Xudong Peng Nov 05 '21 at 09:24

0 Answers0