Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- webpack.config.js
- const data = require('./data');
- const htmlPlugins = data.map(entry => {
- return new HtmlWebpackPlugin({
- filename: entry.name + '.html',
- template: './template.html',
- variableOne: entry.variable
- })
- })
- module.exports = {
- ...htmlPlugins
- }
- index.html
- <div><%= variableOne %></div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement