Preparing and configuring webpack

Our browser requests an index.html file when accessing our application. It specifies all of the files that are required to run our application. We need to create the index.html, which we serve as the entry point of our application:

  1. Create a separate directory for our index.html file:
mkdir publictouch index.html
  1. Then, save this inside index.html:
<!DOCTYPE html><html lang="en">  <head>    <meta charset="UTF-8">    <meta name="viewport" content="width=device-width, initial-      scale=1.0">    <meta http-equiv="X-UA-Compatible" content="ie=edge">    <title>Graphbook</title>  </head>  <body>    <div id="root"></div>  </body></html>

As you can see, no JavaScript is loaded here. There is only div with the root id. This div tag is ...

Get Hands-On Full-Stack Web Development with GraphQL and React 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.