April 2020
Intermediate to advanced
716 pages
18h 55m
English
To bundle client-side code after compiling it with Babel, and also to enable react-hot-loader for faster development, install the following modules by running these commands from the command line:
yarn add -dev webpack-dev-middleware webpack-hot-middleware file-loaderyarn add react-hot-loader @hot-loader/react-dom
Then, to configure Webpack for frontend development and to build the production bundle, we will add a webpack.config.client.js file and a webpack.config.client.production.js file with the same configuration code we described in Chapter 2, Preparing the Development Environment.
With Webpack configured and ready for bundling the frontend React code, next, we will add some code that we can use in our development flow. This ...
Read now
Unlock full access