How do I support Internet Explorer in an Angular 8 application?

According to this issue reply

You need to follow the following steps

  1. Create a new tsconfig tsconfig.es5.json next to tsconfig.json with the below contents
{
 "extends": "./tsconfig.json",
 "compilerOptions": {
     "target": "es5" 
  }
}
  1. In angular.json
    Under projects:yourAppName:architect:build:configurations, add
"es5": {
      "tsConfig": "./tsconfig.es5.json"
    }

and projects:yourAppName:architect:serve:configurations add

    "es5": {
      "browserTarget": "yourAppName:build:es5"
    }

Remember to change yourAppName in app:build:es5 to yourAppName!

full path shown below

"build": {
  "builder": "@angular-devkit/build-angular:browser",
  "options": {
      ...
  },
  "configurations": {
    "production": {
        ...
    },
    "es5": {
      "tsConfig": "./tsconfig.es5.json"
    }
  }
},
"serve": {
  "builder": "@angular-devkit/build-angular:dev-server",
  "options": {
      ...
  },
  "configurations": {
    "production": {
     ...
    },
    "es5": {
      "browserTarget": "yourAppName:build:es5"
    }
  }
},
  1. Run the serve with this configuration using the below command.
ng serve --configuration es5

Leave a Comment