Generating a production build
You might have noticed something about both the Meme Creator and the Event Registration apps. The apps load plain HTML first; after that, styles are loaded. This makes the applications look plain for a moment. This problem does not exist in the ToDo List app because we load CSS first in the ToDo List app. In the Meme Creator app, there was an optional section called Optimizing Webpack builds for different environments. This might be a good time to read it. If you haven't read it yet, go back, give that section a read, and come back to generate the production build.
So far, our app has been working in a development environment. Remember? In the .env
file, I told you to set NODE_ENV=dev
. This is because, when you set NODE_ENV=production
as per the webpack.config.js
file I created, Webpack will go into production mode. The npm run watch
command is used to run the Webpack dev server to create a development server for our use. In your package.json
file, there should...