Examples: use html-webpack-plugin

This commit is contained in:
Laurentiu Nicola
2018-09-11 08:42:22 +03:00
parent 8ffa24bfe5
commit 89005f3469
41 changed files with 116 additions and 42 deletions

View File

@ -3,6 +3,7 @@
"serve": "webpack-dev-server"
},
"devDependencies": {
"html-webpack-plugin": "^3.2.0",
"webpack": "^4.16.5",
"webpack-serve": "^2.0.2"
}

View File

@ -1,4 +1,5 @@
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
entry: './index.js',
@ -6,5 +7,10 @@ module.exports = {
path: path.resolve(__dirname, 'dist'),
filename: 'index.js',
},
plugins: [
new HtmlWebpackPlugin({
template: "index.html"
})
],
mode: 'development'
};