问题
I'm making the decision to no longer support legacy browsers AT ALL and dropping support for ES5 compilation/polyfills.
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.
However, Angular libraries compile to ES2015.
How can we compile our project's packages to ES2016/17/18/19/20?
回答1:
According to this stackoverflow post ES6 as the typescript target compiler option for angularjs or angular2
it seems like "target": "es6"
will do your task.
来源:https://stackoverflow.com/questions/62645152/how-can-i-compile-angular-10-libraries-to-es2016