Build angular2 app with aot rollup for production
First, install dependent packages by:
npm install
create dist
folder if not exists
makedir dist
For normal production build, use broserify and uglifyjs, run:
npm run prod
For optimized production build, use aot and tree shaking, run:
npm run prod-aot
For size analysis report, just, run:
ls -lh dist
the dist/bundle-aot.min.js
compressed with gzip will less then 50K, ideal for production use.