How do I make Angular 8 compatible with IE11?

前端 未结 4 670
时光说笑
时光说笑 2020-12-09 18:30

I upgraded to Angular 8 using ng update. It ran its migration scripts which (among other things) removed the es6/es7 imports in polyfills.ts. From

4条回答
  •  无人及你
    2020-12-09 18:50

    If you want ng serve to build the app for "es5" by default.

    angular.json

    "architect": {
      "build": {
        ...
        "configurations": {
          "development": {
            "tsConfig": "tsconfig-es5.app.json"
          },
          ...
        }
      },
      "serve": {
        ...
        "options": {
          "browserTarget": "bludesk-web:build:development"
        },
        ...
      }
    

    browserlist

    ...
    IE 11
    not IE 9-10
    

    tsconfig-es5.app.json

    {
      "extends": "./tsconfig.app.json",
      "compilerOptions": {
          "target": "es5"
      }
    }
    

提交回复
热议问题