How to enable minification in universal-starter?

660 Views Asked by At

How to enable minification for angular/universal-starter?

Right now the browser loads a 3.4MB index.js file:

enter image description here

Is enableProdMode responsible for minification?

If yes, universal-starter does have enableProdMode in server.ts and client.ts now.

If not, how to enable minification? Thanks

1

There are 1 best solutions below

0
Hongbo Miao On BEST ANSWER

I got a response from @mekya on GitHub.

npm run build:prod

which uses:

webpack --progress -p

inside of package.json file.

And track this on GitHub for more info.