How it works...

Let's test this:

  1. Just run the application with npm start. If you look at the HTML, you will see that it's automatically being injected into the vendor.js and main.js bundles:
  1. If you look at the Network tab, you can see the size of the files:
  1. If you run the application with the production mode, you will notice that the bundles are smaller. Run the npm run start-production command:
  1. With this optimization, we are reducing ...

Get React Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.