In your terminal type the following: mkdir webpack-for-react & cd $_ Let us start by creating our directory and package.json.
Note: You can use npm if you wish, although the commands will vary slightly. In this tutorial we will see the basics of Webpack for React to get you started, including React Router, Hot Module Replacement (HMR), Code Splitting by Route and Vendor, production configuration and more.īefore we start, here’s the full list of features we are going to set up together in this tutorial:Īnd you should have at least some basic knowledge of React and React Router.