🐞 Bug report
Command (mark with an x)
- [ ] new
- [x] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc
Is this a regression?
Yes, the previous version in which this bug was not present was: 8.2.2
Description
After upgrading to Angular CLI 8.3.0, after making a prod build, the scripts.js file is larger. Local variable names are not being minified
🔬 Minimal Reproduction
- Create a new project with
ng new.
- Create a simple
test.js file in the project root with the follow content:
function testFunction() {
var longVariableName = Date.now();
console.log(longVariableName);
}
- In
angular.json, set scripts to ["test.js"].
- Run
ng build --prod.
- In the output
scripts.[hash].js, local variable names are not minified.
Angular CLI 8.2.2 output:
function testFunction(){var n=Date.now();console.log(n)}
Angular CLI 8.3.0 output:
function testFunction(){var longVariableName=Date.now();console.log(longVariableName)}
🌍 Your Environment
Angular CLI: 8.3.0
Node: 10.14.1
OS: win32 x64
Angular: 8.2.4
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.803.0
@angular-devkit/build-angular 0.803.0
@angular-devkit/build-optimizer 0.803.0
@angular-devkit/build-webpack 0.803.0
@angular-devkit/core 8.3.0
@angular-devkit/schematics 8.3.0
@angular/cli 8.3.0
@ngtools/webpack 8.3.0
@schematics/angular 8.3.0
@schematics/update 0.803.0
rxjs 6.4.0
typescript 3.5.3
webpack 4.39.2
🐞 Bug report
Command (mark with an
x)Is this a regression?
Yes, the previous version in which this bug was not present was: 8.2.2Description
After upgrading to Angular CLI 8.3.0, after making a prod build, the
scripts.jsfile is larger. Local variable names are not being minified🔬 Minimal Reproduction
ng new.test.jsfile in the project root with the follow content:angular.json, setscriptsto["test.js"].ng build --prod.scripts.[hash].js, local variable names are not minified.Angular CLI 8.2.2 output:
Angular CLI 8.3.0 output:
🌍 Your Environment