1//installation
2npm install --save-dev html-webpack-plugin
3
4//configuration
5var HtmlWebpackPlugin = require('html-webpack-plugin');
6var path = require('path');
7
8module.exports = {
9 entry: 'index.js',
10 output: {
11 path: path.resolve(__dirname, './dist'),
12 filename: 'index_bundle.js'
13 },
14 plugins: [new HtmlWebpackPlugin({
15 template: "./index.html",
16 })]
17};