create-react-app icon indicating copy to clipboard operation
create-react-app copied to clipboard

Enable Development builds

Open fredlllll opened this issue 1 year ago • 2 comments

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

fredlllll avatar Mar 25 '24 23:03 fredlllll

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

xrentech avatar Apr 02 '24 10:04 xrentech

Uploading Picsart_24-08-14_23-30-15-036.jpg…

HdMaza avatar Aug 20 '24 07:08 HdMaza