This is a test.
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const HtmlWebpackPartialsPlugin = require('../../');
module.exports = {
entry: {
main: path.join(__dirname, './main.js')
},
output: {
path: path.join(__dirname, './dist'),
filename: '[name].js'
},
plugins: [
new HtmlWebpackPlugin(),
new HtmlWebpackPartialsPlugin({
path: path.join(__dirname, './partials/body.html'),
options: {
header: 'Hello world!',
copy: 'This is a test.'
}
})
]
};
console.log('Test!');
<h1><%= header %></h1> <p><%= copy %></p> ...and the rest of this configuration example