The current after-prepare hook's check to determine what env - 'production' or 'development' - it is building for does not match the check used in the before-checkForChanges hook. Specifically, it does not identify we are performing a production build if the release flag is set, unless env.production or env.prod are specified.
I have also simplified and made sure the way isProdEnv and isStagingEnv are computed is consistent across the two scripts.
The current after-prepare hook's check to determine what env - 'production' or 'development' - it is building for does not match the check used in the before-checkForChanges hook. Specifically, it does not identify we are performing a production build if the release flag is set, unless env.production or env.prod are specified.
I have also simplified and made sure the way isProdEnv and isStagingEnv are computed is consistent across the two scripts.