Skip to content

Instantly share code, notes, and snippets.

@0xAnon101
Last active September 27, 2018 11:08
Show Gist options
  • Save 0xAnon101/5d3999614b715d1e9fc875d2532ecd2b to your computer and use it in GitHub Desktop.
Save 0xAnon101/5d3999614b715d1e9fc875d2532ecd2b to your computer and use it in GitHub Desktop.
const HtmlWebPackPlugin = require('html-webpack-plugin');
const htmlPlugin = new HtmlWebPackPlugin({
template: "./src/index.html",
filename: "./index.html"
})
module.exports = (env,argv) => {
return {
optimization: {
nodeEnv: argv.mode
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader'
}
},
]
},
plugins: [htmlPlugin]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment