# How to enable production mode in RC0

**URL:** <https://forum.ionicframework.com/t/how-to-enable-production-mode-in-rc0/65060>\
**Category:** ionic-v3\
**Created:** [September 29, 2016, 7:41pm UTC](https://forum.ionicframework.com/t/how-to-enable-production-mode-in-rc0/65060 "2016-09-29T19:41:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![larssn](https://avatars.discourse-cdn.com/v4/letter/l/cab0a1/32.png) [@larssn](https://forum.ionicframework.com/u/larssn)\
**Post date:** [September 29, 2016, 7:41pm UTC](https://forum.ionicframework.com/t/how-to-enable-production-mode-in-rc0/65060/1 "2016-09-29T19:41:00Z")

</div>

The config page [http://ionicframework.com/docs/v2/api/config/Config/](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?

---

<div class="post-metadata">

**Author:** ![PhilippRath](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@PhilippRath](https://forum.ionicframework.com/u/PhilippRath)\
**Post date:** [September 29, 2016, 8:04pm UTC](https://forum.ionicframework.com/t/how-to-enable-production-mode-in-rc0/65060/2 "2016-09-29T20:04:34Z")

</div>

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”  
},

---

<div class="post-metadata">

**Author:** ![larssn](https://avatars.discourse-cdn.com/v4/letter/l/cab0a1/32.png) [@larssn](https://forum.ionicframework.com/u/larssn)\
**Post date:** [September 29, 2016, 9:36pm UTC](https://forum.ionicframework.com/t/how-to-enable-production-mode-in-rc0/65060/3 "2016-09-29T21:36:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![hawary](https://avatars.discourse-cdn.com/v4/letter/h/b9e5f3/32.png) [@hawary](https://forum.ionicframework.com/u/hawary)\
**Post date:** [October 10, 2016, 11:10am UTC](https://forum.ionicframework.com/t/how-to-enable-production-mode-in-rc0/65060/4 "2016-10-10T11:10:26Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![radoo](https://avatars.discourse-cdn.com/v4/letter/r/b2d939/32.png) [@radoo](https://forum.ionicframework.com/u/radoo)\
**Post date:** [October 18, 2016, 8:25pm UTC](https://forum.ionicframework.com/t/how-to-enable-production-mode-in-rc0/65060/5 "2016-10-18T20:25:24Z")

</div>

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