I am building an Ionic App in a Continuous Integration environment (CircleCI).
In my workflow steps I have:
npm run build --prod
However, this is not enabling production mode.
Using import { environment } from '../../../environments/environment';
environment.production = false;
Using import { isDevMode } from '@angular/core';
isDevMode = true;
This works fine: ionic build --prod
Production Mode is enabled ( as per environment.production
)
If I attempt to use:
npm run ionic:build --prod
Then I get the error:
missing script: ionic:build
So, is there a way to enable production mode without using ionic build --prod ?
Or will I need to install ionic/app-scripts in CircleCI build?