Skip to content

Instantly share code, notes, and snippets.

@b-tiwari
Created May 6, 2017 13:15
Show Gist options
  • Save b-tiwari/38756ee1e2740d37e8c9f889e2bf71aa to your computer and use it in GitHub Desktop.
Save b-tiwari/38756ee1e2740d37e8c9f889e2bf71aa to your computer and use it in GitHub Desktop.
webpack2 Beginners Guide - enable watch mode - webpack.config.js
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