Webpack 4 does not need a configuration file by default. In the older versions, you had to have a configuration file. If you need to customize Webpack 4 to your project's needs, you can still create a configuration file, which will be much easier to configure.
Webpack 4 Zero Configuration
Getting Ready
For this recipe, you need to create a new folder and install the following packages:
mkdir webpack-zero-configuration
cd webpack-zero-configuration
npm install --save-dev webpack webpack-cli
In your Webpack folder, you need to create a package.json file, and for this, you can use the following command:
npm init -y