Skip to content

Instantly share code, notes, and snippets.

@Chryus
Created December 28, 2016 19:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Chryus/61c2f4da314d2f4c72dd3a694f6b1a62 to your computer and use it in GitHub Desktop.
Save Chryus/61c2f4da314d2f4c72dd3a694f6b1a62 to your computer and use it in GitHub Desktop.
var HtmlWebpackPlugin = require('html-webpack-plugin');
var HtmlWebpackPluginConfig = new HtmlWebpackPlugin({
template: __dirname + '/app/index.html',
filename: 'index.html',
inject: 'body'
})
module.exports = {
entry: [
'./app/index.js'
],
output: {
path: __dirname + '/dist',
filename: "index_bundle.js"
},
module: {
loaders: [
{test: /\.js$/, exclude: /node_modules/, loader: "babel-loader"}
]
},
plugins: [HtmlWebpackPluginConfig]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment