const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
entry: {
index: './src/index.js',
},
plugins: [
new HtmlWebpackPlugin({
title: 'Production',
scriptLoading: 'blocking',
})
],
output: {
filename: '[name].bundle.js',
path: path.resolve(__dirname, 'dist'),
clean: true,
publicPath: '',
},
module: {
rules: [
{
test: /\.js$/,
include: path.resolve(__dirname, 'src/index.js'),
},
{
test: /\.css$/i,
use: [
'style-loader',
'css-loader'
],
},
],
},
};