Webpack builds one js bundle file, so you need to get rid of the cdn's in the html file. You can add them into the webpack.config file with plugins.
npm install webpack-cdn-plugin --save-dev https://www.npmjs.com/package/webpack-cdn-plugin
- EDIT -
You could do npx create-react-app your-app
or
Or if you just want react and babel you could use npm.
Make sure you have a package.json.
npm init add react.
npm install react react-dom --save-dev https://www.npmjs.com/package/react-dom
add babel.
npm install babel-loader @babel/core @babel/preset-env @babel/preset-react --save-dev https://babeljs.io/setup#installation
You can find the dependencies in your package.json.
Then reconfigure webpack.config.js.
module.exports = { entry: './src/app.js', output: { path: path.join(_dirname, 'public'), filename: 'bundle.js' module: { rules: [ { test: /\.(js|jsx)$/, exclude: /node_modules/, use: { loader: 'babel-loader', options: { presets: [ '@babel/preset-env', '@babel/preset-reactreact' ] } } } ] } };