const HtmlWebPackPlugin = require("html-webpack-plugin"); const path = require('path'); const htmlPlugin = new HtmlWebPackPlugin({ title: "Production", template: "src/index.html" }); module.exports = { entry: { app: './src/index.js', }, module: { rules: [ { test: /\.js$/, exclude: /node_modules/, use: { loader: "babel-loader" } }, { test: /\.css$/, use: ["style-loader", "css-loader"] } ] }, plugins: [htmlPlugin], output: { filename: '[name].bundle.js', path: path.resolve(__dirname, 'dist'), clean: true } };