Enable dev mode instead of disable
We have a use case where we use Vercel for staging environment deployments. Here, the build is very much like a production build in that the NODE_ENV is production, but we would still like to see the variation switcher from dev mode.
https://github.com/growthbook/growthbook-react/blob/main/src/index.tsx#L60 hardcodes that disableDevMode can only be used when NODE_ENV is not production. Perhaps if we remove this rule and set disableDevMode = process.env.NODE_ENV === "production" as the default value, we will be able to overwrite disableDevMode.
We also would benefit from this exact same scenario. We have production builds on staging, which we would want to enable the devmode for, so we can test out the variations.
There is now a standalone dev mode npm package that can be used even when NODE_ENV is production. https://www.npmjs.com/package/@growthbook/dev
It's only meant for dev/staging environments so make sure to conditionally render it so it doesn't show up in actual production.
Also, FYI this repo is being deprecated and the react code has moved to the main GrowthBook monorepo at https://github.com/growthbook/growthbook