Skip to content

Instantly share code, notes, and snippets.

@b-tiwari
Created May 6, 2017 05:49
Show Gist options
  • Save b-tiwari/7b3984b653b4288d90223c093679e2c1 to your computer and use it in GitHub Desktop.
Save b-tiwari/7b3984b653b4288d90223c093679e2c1 to your computer and use it in GitHub Desktop.
Webpack2 Beginners guide - 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
},
plugins: [
new HtmlWebpackPlugin({
hash: true,
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