Angular 使用最少数量的文件构建 ng? (只支持 Chrome 也可以)
Angular ng build with minimum number of files ? (supporting only Chrome is also fine)
当我构建 angular 项目时,我看到
main-es5.js
和 main-es2015.js
两个文件。我只想支持 Chrome 浏览器 我怎样才能关闭构建旧的 js 文件 我想要构建时的最少文件数。
自从我升级到 8 后,我的构建也运行了两次
备注
Build time has significantly increased and i get the warning WARNING
in budgets, maximum exceeded for initial.
这是我的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
上提出功能请求
在 tsconfig.json 中有目标:"es2015" 将目标更改为 "es5" 您将获得类似 angular 7 应用程序的构建。
根据@clydin 's comment on GitHub
**browserlist**
last 2 Chrome versions
https://browserl.ist/?q=last+2+Chrome+versions
仅创建一个最小的 chrome ES2015+ 构建
当我构建 angular 项目时,我看到
main-es5.js
和 main-es2015.js
两个文件。我只想支持 Chrome 浏览器 我怎样才能关闭构建旧的 js 文件 我想要构建时的最少文件数。
自从我升级到 8 后,我的构建也运行了两次
备注
Build time has significantly increased and i get the warning WARNING in budgets, maximum exceeded for initial.
这是我的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
上提出功能请求在 tsconfig.json 中有目标:"es2015" 将目标更改为 "es5" 您将获得类似 angular 7 应用程序的构建。
根据@clydin 's comment on GitHub
**browserlist**
last 2 Chrome versions
https://browserl.ist/?q=last+2+Chrome+versions
仅创建一个最小的 chrome ES2015+ 构建