Skip to content

Instantly share code, notes, and snippets.

@adeelibr
Last active April 22, 2018 12:36
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 adeelibr/e87000bf04b543416871dda9bb0aa6fb to your computer and use it in GitHub Desktop.
Save adeelibr/e87000bf04b543416871dda9bb0aa6fb to your computer and use it in GitHub Desktop.
Webpack base configuration for .js and html
var HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader'
}
}
]
},
plugins: [
new HtmlWebpackPlugin({
template: './src/index.html',
filename: './index.html'
})
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment