Angular cli builder supports NG_BUILD_MANGLE
, NG_BUILD_MINIFY
, NG_BUILD_BEAUTIFY
node environment params (checked in version 8).
You can set them when running npm script in following way:
env NG_BUILD_MANGLE=false NG_BUILD_MINIFY=false NG_BUILD_BEAUTIFY=true ng build --prod
This will result in unminified output, yet tree shaking and other optimizations will still be applied (compared to just turning off optimization).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…