I am working on a landing page for a chrome dev tool that my team and I have created. Our landing page contains a sandbox intended to allow visitors to test our dev tool. Upon deployment, we realized that the dev tool won’t work with the sandbox, because the sandbox is deployed in production mode (minified/uglified component names, no access to fiber tree render properties). I’ve seen other posts talk about the performance issues that come from deploying in development mode, which I am not concerned about, and that shows me that it is possible. Our app is using Webpack to build the bundle, and Netlify to deploy. The website itself is built in React/Recoil.
When you run npm run build on a create-react-app project, the NODE_ENV variable will always be production.
You also won’t be able to use the --watch since Netlify doesn’t support running a server (which your webpack.config.js implies). You’ll probably want a third build script instead, where it builds your project without any minifications, etc.