本文介绍了如何将Angular 10库编译到ES2016?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在决定不再完全支持旧版浏览器,并放弃对ES5编译/填充的支持.
I'm making the decision to no longer support legacy browsers AT ALL and dropping support for ES5 compilation/polyfills.
我将Angular项目代码进行了编译,覆盖了约85%的范围
I have my Angular project code compiling for ~85% coverage to
"compilerOptions": {
"target": "es2016",
"module": "es2020",
"lib": [
"es2019",
"dom"
这些选项控制项目的代码.
These options control the project's code.
但是,Angular库可以编译到ES2015.
However, Angular libraries compile to ES2015.
我们如何将项目的程序包编译到ES2016/17/18/19/20?
How can we compile our project's packages to ES2016/17/18/19/20?
推荐答案
根据此stackoverflow帖子
According to this stackoverflow post ES6 as the typescript target compiler option for angularjs or angular2
似乎"target": "es6"
将完成您的任务.
这篇关于如何将Angular 10库编译到ES2016?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!