angular - ng build 不会将箭头函数转换为 es5
问题描述
我在 Angular 4 上有一个旧项目,这个项目需要与 IE11 兼容,所以我添加了所有需要 pollyfills 才能在 IE 上工作,我还将我的 tsconfig.ts 文件更改为:
"compileOnSave": false,
"compilerOptions": {
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es5",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2017",
"es6",
"dom"
]
}
}
但是当我使用ng build --prod
, or时ng build
,ng build --prod --aot
我的供应商文件仍然包含箭头函数。( =>
)
解决方案
推荐阅读
- npm - 在 bitbucket 管道中执行命令后需要插入用户名和密码
- python - 制作 pandas Multiindex 数据帧比追加更快的方法
- c++ - Libcurl 没有给出响应但详细模式显示服务器发送了一个
- google-bigquery - Airflow BigQuery Hook - 通过 run_query 运行更新查询
- progressive-web-apps - Firebase 托管设置 - “设置工作流程以在每次部署之前运行构建脚本?(是/否)
- postgresql - Azure Postgres Oracle 外部数据包装器
- flutter - 从 dart 文件颤振中的本机代码重定向问题回调后
- c# - 如何在不绑定 Unity 的情况下赋予对象弹性
- python - 在 Dask DataFrame 中保留具有一定数量的非 NaN 整数的索引
- c++ - 我在使用 codelite ide 输入二维数组时遇到问题