Open fredlllll opened 8 months ago
I support OP statement, it's a feature especially needed it now. If we want to enable SSR in our app built initially with CRA, we need to to able to ouput a dev build for the express service in a Dev environment
![Uploading Picsart_24-08-14_23-30-15-036.jpg…]()
It was a fairly easy change of just a few lines to allow the buildscript to interpret the NODE_ENV variable for the environment. if security is your concern, i could also use a different env variable like REACT_NODE_ENV_YES_IM_SURE.
i and many other people have needed this feature for almost 8 years now as evident by this issue https://github.com/facebook/create-react-app/issues/790
it boggles the mind how this is hardcoded to production builds. not every stack is built in a way that enables testing with npm start and then deployment with npm run build. there has to be a way to enable dev/staging builds even if it requires setting silly env vars like mentioned above
please feedback if you want me to change the env var name