function getEffectiveEnv(opts) {
    // If we've requested a production compile we enforce use of the production env
    // If we don't a user's global NODE_ENV may override and prevent minification of assets
    if (opts.production) {
        return 'production';
    }

    // We use `development` by default or under certain specific conditions when testing
    if (!process.env.NODE_ENV || (isTesting() && process.env.NODE_ENV === 'test')) {
        return 'development';
    }

    // Otherwsise defer to the current value of NODE_ENV
    return process.env.NODE_ENV;
}
Get the effective envirnoment to run in

* @param {{[key: string]: any}} opts