Shipping the code
Now that you have learned how to generate production builds, what if you want to send this code to someone else? Say the DevOps team or the server administrator. In this case, if you are using version control, add the dist/ directory, the node_modules/ directory, and the .env files to your ignore list. Send the code without these two directories and the .env file. The other person should be able to figure out which environment variables to use using the .env.example file, creating the .env file, and also using the npm install and npm run webpack commands to generate the node_modules/ and dist/ directories.
For all the other steps, neatly document the procedure in a README.md file in your project root folder and send it along ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access