webpack.config.js
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
entry: './src/index.js',
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist'),
},
plugins: [
new HtmlWebpackPlugin({
template: './src/html/views/index.html',
}),
],
module: {
rules:[
{
test:/\.html$/,
include: path.resolve(__dirname, 'src/html/includes'),
loader: 'raw-loader'
}
]
}
};