当我建立我的角度计划时,我看到
main-es5.js
和main-es2015.js
都是文件。我只想支持Chrome浏览器,如何关闭构建旧的js文件,我希望生成的文件数量最少。
自从升级到8之后,我的构建也运行了两次。
备注
构建时间已经显著增加,我在预算中得到警告,最初的最高超过。
这是我的Angular.json文件
"optimization": true,
"outputHashing": "none",
"sourceMap": true,
"extractCss": false,
"namedChunks": false,
"showCircularDependencies": false,
"aot": true,
"extractLicenses": false,
"statsJson": false,
"progress": true,
"vendorChunk": false,
"buildOptimizer": true,
浏览器列表文件
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries
# You can see what browsers were selected by your queries by running:
# npx browserslist
> 0.5%
last 2 versions
Firefox ESR
not dead
not IE 9-11 # For IE 9-11 support, remove 'not'.
编辑:在Github上提出的特性请求
发布于 2019-06-05 18:11:15
**browserlist**
last 2 Chrome versions
https://browserl.ist/?q=last+2+Chrome+versions
创建一个仅限铬的ES2015+构建
发布于 2019-06-05 16:42:42
在tsconfig.json中有一个目标:"es2015“将目标更改为"es5”,您将得到类似于Range7应用程序的构建。
https://stackoverflow.com/questions/56464376
复制相似问题