Custom build path for development-mode react scripts build?

Viewed 20

I've got a react frontend served by a rust backend, for which I'm trying to enable hot reload. Unfortunately, it seems that if I use react-scripts start, I get a development build with hot reloading, but with no control over where the build files go, so I can't serve the assets through my backend. If I instead use react-scripts build, I can use the BUILD_PATH environment variable to control where the build files go, but I get a production-optimized build, with debugging details obfuscated, and no hot reloading.

Right now I'm using npm-watch to hot reload a production build with react-scripts build, which is almost what I'm looking for, but is there any way to get a development build with hot reloading without ejecting from create-react-app?

0 Answers
Related