The config page http://ionicframework.com/docs/v2/api/config/Config/ seems outdated.
With the recent changes and the introduction of ngModule(), how do one enable prod mode?
The config page http://ionicframework.com/docs/v2/api/config/Config/ 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 . 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/main.prod.ts” file not “src/app/main.dev.ts file”, but I don’t know how?
in RC1, when building, you can do:
ionic build --release android -prod
which enables prodmode for the final build process.