Chapter 12. The Webpack build tool

This chapter covers

  • Adding Webpack to a project
  • Modularizing your code
  • Running Webpack and testing the build
  • Performing hot module replacement

Before we go any further with the React stack (a.k.a. React and friends), let’s look at a tool that’s essential to most modern web development: a build tool (or bundler). You’ll use this tool in subsequent chapters to bundle your many code files into the minimum number of files needed to run your applications and prepare them for easy deployment. The build tool you’ll be using is Webpack (

If you’ve not come across a build tool before, or if you’ve used another one such as Grunt, Gulp, or Bower, this chapter is for you. You’ll learn how ...

Get React Quickly: Painless web apps with React, JSX, Redux, and GraphQL now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.