Closed
Description
Versions
Angular CLI: 6.0.0-beta.5
Node: 9.7.1
OS: darwin x64
Angular: 5.2.9
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
@angular/cli: 6.0.0-beta.5
@angular-devkit/build-optimizer: 0.4.5
@angular-devkit/core: 0.4.5
@angular-devkit/schematics: 0.4.5
@ngtools/json-schema: 1.2.0
@ngtools/webpack: 6.0.0-beta.5
@schematics/angular: 0.4.5
@schematics/package-update: 0.4.5
typescript: 2.5.3
webpack: 4.0.1
Repro steps
- npm install -g @angular/cli@next
- ng new project
- cd project
- ng build --prod (or npm run build)
Also tested:
- npm install -g @angular/cli@next
- ng new project
- cd project
- ng update --next
- ng build --prod (or npm run build)
And optional:
- change
"target"
from"es5"
to"es2015"
intsconfig.json
Observed behavior
$ ng build --prod
10% building modules 3/3 modules 0 active(node:62415) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
Date: 2018-03-15T10:28:55.547Z
Hash: 3474e7c683382f9506ba
Time: 4039ms
chunk {main} main.js, main.js.map (main) 9.48 kB [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 224 kB [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 5.09 kB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 15.5 kB [initial] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 2.71 MB [initial] [rendered]
The resulting file sizes vary a little bit, depending on the used settings (angular 5, angular 6 beta, es5 or es2015).
Desired behavior
Much smaller bundle sizes.
Mention any other details that might be useful (optional)
When looking at the generated .js files, I can see lot's of whitespaces, comments, etc. pp. Though I guess that uglify is not running.
There's no error in the output. The only warning in the output (you can see above) is DeprecationWarning: Tapable.plugin is deprecated. Use new API on
.hooks instead
The same results could be observed when using @angular/cli: 6.0.0-beta.4
.