August 2017
Beginner
298 pages
7h 4m
English
The one thing that we have been doing in every chapter is to generate the production builds. We did this by setting the NODE_ENV variable in the .env file to production and then running npm run webpack in the Terminal. However, for this chapter, since we are using create-react-app, we don't have to worry about setting the environment variables. We just need to run the following command in the Terminal from the project root folder:
npm run build
Once you run this command, you will have your production build with all the optimizations done and ready for use in the build directory of the project. Generating builds with create-react-app is that simple!
Once the production build is generated, run http-server inside ...
Read now
Unlock full access