Webpack needs a configuration called object where you describe its behaviour. Webpack expects configuration object to be in webpack.config.js file by default. First of all you need to install webpack and babel locally:…