facebook/create-react-app

Unoptimized build for "react-scripts build"

tcr opened this issue · 5 comments

tcr commented

I'm using "react-scripts build" as part of a workflow with an express server that relies on running "react-scripts build" on deploy. Is there a way to speed up build times for the build script, by running a "--debug" or "--unoptimized" flag?

Currently, no. react-scripts build is optimized to output an optimized production static files, which means uglifying, dedupe, .etc. Also, I'm curious about your build setup, shouldn't react-scripts build run locally / CI server? your production server shouldn't ever run it. It should just serve the optimized build.

See #1070 for more info

Yea, this is pretty much the same request as #1070 so let’s close in favor of that.
Currently we recommend using npm start in development, and the proxy feature in case you want to tie that in with a backend on a different port.

@viankakrisna Perfect! I use react-script build as part of another build process of my web app. I want to run react-app in development mode when i build whole my app in development mode.

You can run react-scripts start & which essentially runs react-scripts unoptimized and the & at the end escapes it.