Created
May 6, 2017 13:15
-
-
Save b-tiwari/38756ee1e2740d37e8c9f889e2bf71aa to your computer and use it in GitHub Desktop.
webpack2 Beginners Guide - enable watch mode - webpack.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var HtmlWebpackPlugin = require('html-webpack-plugin'); | |
module.exports = { | |
entry: "./src/scripts/app.js", //relative to root of the application | |
output: { | |
filename: "./dist/app.bundle.js" //relative to root of the application | |
}, | |
watch:true, | |
plugins: [ | |
new HtmlWebpackPlugin({ | |
hash: true, | |
title: 'My Awesome application', | |
myPageHeader: 'Hello World', | |
template: './src/index.html', | |
filename: './dist/index.html' //relative to root of the application | |
}) | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment