How to enable production mode in RC0


The config page seems outdated.

With the recent changes and the introduction of ngModule(), how do one enable prod mode?


it seams if you run build than it is automatically enabled, wich is a problem that some of us have :smiley:. in the

package.json in scripts object you can set --dev after build to set it to development mode

“scripts”: {
“build”: “ionic-app-scripts build --dev”,
“watch”: “ionic-app-scripts watch”,
“serve:before”: “watch”,
“emulate:before”: “build”,
“deploy:before”: “build”,
“build:before”: “build”,
“run:before”: “build”


Aha, thanks. Will be nice when the docs get up to date.


Automatically enabled! how come.
But the browser still display
"Angular 2 is running in the development mode. Call enableProdMode() to enable the production mode."

I think it’s not in prod mode by default and we have to enable it in order to run the “src/app/” file not “src/app/ file”, but I don’t know how?

What should I do before submitting my Ionic 2 app

in RC1, when building, you can do:
ionic build --release android -prod
which enables prodmode for the final build process.