You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 1, 2020. It is now read-only.
Introduce a new flag that gets passed in like this:
ionic serve --env qa or ionic run android --env prod
My first thought was that it's value would default to dev for non-prod builds, and prod for prod builds. Developer's can pass in whatever they want, though.
Based on the value that is passed in (or inferred), the config section of the package.json is read. It could look something like this:
If the ionic_env data is not there, we would just move on in the build process. If it is present, we would then perform the text replacement.
Any computed values, sync or async, could be replaced after the build is done. We could either leave this up to the user to add on to the npm script section, or we could provide a hook into the postprocess step. I prefer the latter as it's easier to document and and we can probably make it a 1/2 second faster or so if we do it in app-scripts.
Feedback is appreciated.
Thanks,
Dan
rolandjitsu, Sh1d0w, davidgg, konrin, gianpaj and 48 more