# Environment

# mix.env

interface BalmEnvObject {
  isProd: boolean;
  isTest: boolean;
  isDev: boolean;
  inSSR: boolean;
}

mix.env: BalmEnvObject

The same as the balm.config.env.

🌰 For example:

const api = (mix) => {
  console.log(mix.env); // Be equal to `balm.config.env`, Output: { isProd, isTest, isDev, inSSR }

  if (mix.env.isProd) {
    // production
  } else {
    // development
  }
};

module.exports = (balm) => {
  return {
    config: {},
    api
  };
};
Last Updated: 18 hours ago