admin管理员组文章数量:1123779
I am running linux in AWS and can't seem to figure out if it is running development configuration or the production configuration. I am using Angular 13 (still)
My configuration looks like this.
"configurations": {
"production": {
"aot": true,
"optimization": true,
"buildOptimizer": true,
"sourceMap": false,
"outputHashing": "all",
"namedChunks": false,
"vendorChunk": false,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "7mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "175kb",
"maximumError": "190kb"
}
],
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
]
},
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
}
},
"defaultConfiguration": "production"
},
my afterinstall script to build angular in Linux box in AWS is
./node_modules/.bin/ng build --configuration=production >> ngbuildlog.txt
but it seems to run development configuration instead. I think this because optimization is not working, it doesn't shrink the vendor.js size. My vendor.js file is 10 mb. when I test it locally using development with "optimization": true and "buildOptimizer": true. It will shrink it to 2mb. Any ideas?
本文标签: optimizationcan39t get angular app to shrink the vendorjs sizeStack Overflow
版权声明:本文标题:optimization - can't get angular app to shrink the vendor.js size - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736598167a1945174.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论