gatsby-config.js

const activeEnv =
  process.env.GATSBY_ACTIVE_ENV || process.env.NODE_ENV || "development"

const isDev = activeEnv === "development"

module.exports = {
  plugins: [
    ...(isDev
      ? [
          {
            resolve: "@prototyp/gatsby-plugin-gumball-debug",
            options: {
              debug: true,
            },
          },
        ]
      : [])
  ],
}