首页 > 解决方案 > 在 Opera mini 中用于 Angular 10 的填充物是什么?

问题描述

是否要添加任何多边形填充以使 angular 10 在 Opera mini 中工作?

标签: angularopera-mini

解决方案


经过几个小时的调查,我找到了解决方案。我们可以在 tsconfig.base.json 中将 target 修改为 es5,因为 es6 在 Opera mini 中不起作用。

tsconfig.base.json

/* 要了解有关此文件的更多信息,请参阅:https ://angular.io/config/tsconfig 。*/

{
  "compileOnSave": false,
  "compilerOptions": {
    "baseUrl": "./",
    "outDir": "./dist/out-tsc",
    "sourceMap": true,
    "declaration": false,
    "downlevelIteration": true,
    "experimentalDecorators": true,
    "moduleResolution": "node",
    "importHelpers": true,
    "target": "es2015",
    "module": "es2020",
    "lib": [
      "es2018",
      "dom"
    ]
  }
}

修改一个

/* 要了解有关此文件的更多信息,请参阅:https ://angular.io/config/tsconfig 。*/

{
  "compileOnSave": false,
  "compilerOptions": {
    "baseUrl": "./",
    "outDir": "./dist/out-tsc",
    "sourceMap": true,
    "declaration": false,
    "downlevelIteration": true,
    "experimentalDecorators": true,
    "moduleResolution": "node",
    "importHelpers": true,
    "target": "es5",
    "module": "es2020",
    "lib": [
      "es2018",
      "dom"
    ]
  }
}

供参考,请通过以下链接

https://angular.io/guide/typescript-configuration https://angular.io/cli/build


推荐阅读