1 | npm install -- global imagemin-cli imagemin src/assets/images/* --out-dir=dist/angular-bvbmedia/assets/images/ |
To automate this process add the following lines to package.json:
1 | "build" : "ng build --prod" |
1 | "postbuild" : "imagemin src/assets/images/* --out-dir=dist/angular-bvbmedia/assets/images/" |
And from now build the project by running the npm command:
1 | npm run build |