![one cli for webpack must be installed error one cli for webpack must be installed error](https://i.stack.imgur.com/lgf8Z.png)
Since we’re using Webpack we’ll need to install the webpack node module and webpack-cli since we’ll be running the development server. To do that we’ll need to use Webpack for doing our heavy lifting to compile our JavaScript files. Initially we’ll just be focusing on creating a simple react app with the least amount of dependencies to get the react app working. With those files in place we can turn our attention to our Webpack setup. We can also create a sub directory called components which will hold our react components. Inside our src folder we can create a index.js file which will be the entry point for our React app.
![one cli for webpack must be installed error one cli for webpack must be installed error](https://user-images.githubusercontent.com/31630035/96504815-df7cc580-1272-11eb-9bf9-9e34ed6fd58c.png)
We will also be creating a src folder inside our project root directory that will hold our JavaScript and JSX files for our React application. Inside dist folder we can create a index.html file as well as a bundle.js file which will be our webpack bundled and compiled JavaScript. First, in our project directory create a dist folder which will hold all of our webpack compiled scripts and our main entry javascript file for our react application along with css files that we will be adding. We can also create our folder structure and add some required files that we will need for our project. Since this is a react application we’ll need to install some react dependencies: npm i react react-dom We can make sure that we can use a dependency manager like npm by initializing a package.json by executing: npm init -y We can first create a project folder called react-webpack-config and change into the directory. Let’s start off by creating our folder structure for our React project.
![one cli for webpack must be installed error one cli for webpack must be installed error](https://i.stack.imgur.com/x6ZjJ.png)
If you are creating a react application it’s quick and easy to jump to using the create react app (CRA) provided by the React development team. Webpack Config for React Including Babel Presets, Webpack Dev Server, Hot Module Replacement, MiniCssExtractPlugin, PostCSS and Eslint Autofix