-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
Hi!
As the title says,, I'm trying to serve my environment locally with the prod settings; Doesn't work out of the box. After following the instructions on your root .md file, I've done this:
package.json
Add an npm run script:
"serve:prod:win": "set MY_ENV=prod && ionic-app-scripts serve"
config/webpack.config.js
Update:
var env = process.env.MY_ENV;
// Set default environment to "dev"
env = env.trim();
console.log('>>>> chosen environment: "' + env + '"');
Doesn't seem quite right, even though the variable "prod" is shown to be properly selected via the console.log as I npm run serve:prod:win, it's still the dev file that's in use.
N.B. I don't quite understand webpack, so don't consider this an educated guess :-)
How would you approach this?
ph-shah and jarrettj
Metadata
Metadata
Assignees
Labels
No labels