// webpack.config.js const path = require('path'); const HtmlWebpackPlugin = require('html-webpack-plugin'); module.exports = { entry: './src/index.js', output: { path: path.resolve(__dirname, 'dist'), filename: 'bundle.js', }, module: { rules: [ { test: /\\.(js|jsx)$/, exclude: /node_modules/, use: 'babel-loader', }, ], }, plugins: [ new HtmlWebpackPlugin({ template: 'public/index.html', }), ], devServer: { static: path.resolve(__dirname, 'public'), port: 3000, }, };