Create-react-app: Unoptimized build for "react-scripts build"

Created on 10 Apr 2017  路  5Comments  路  Source: facebook/create-react-app

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?

All 5 comments

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.

Yea, this is pretty much the same request as https://github.com/facebookincubator/create-react-app/issues/1070 so let鈥檚 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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AlexeyRyashencev picture AlexeyRyashencev  路  3Comments

jnachtigall picture jnachtigall  路  3Comments

fson picture fson  路  3Comments

ap13p picture ap13p  路  3Comments

alleroux picture alleroux  路  3Comments