React private cache
However this is not quite enough if you use client-side routing. The build folder with static assets is the only output produced by Create React App. Since Create React App is completely platform-agnostic, there’s no need to explicitly use Node.
#React private cache software#
The choice of your server software isn’t important either.
#React private cache install#
Static Server #įor environments using Node, the easiest way to handle this would be to install serve and let it handle the rest: For more information see the production build section of the Create React App documentation. Set up your favorite HTTP server so that a visitor to your site is served index.html, and requests to static paths like /static/js/main.js are served with the contents of the /static/js/main.js file. Npm run build creates a build directory with a production build of your app.
If you're using code splitting to split up your application, this will create additional chunks in the build/static folder as well. You can opt out of this by specifying INLINE_RUNTIME_CHUNK=false, which will load this chunk instead of embedding it in your index.html. The contents of this will be embedded in your build/index.html file by default to save an additional network request.