const path = require('path')
const HtmlWebpackPlugin = require('html-webpack-plugin')
module.exports = {
entry: './src/main.js',
output: {
filename: 'app.js',
path: path.resolve(__dirname, './public'),
publicPath: '/public/'
},
module: {
rules: [
{
test: /\.js$/,
loader: 'babel-loader',
exclude: '/node_modules/'
}
]
},
plugins: [
new HtmlWebpackPlugin({
hash: true,
template: './src/index.html',
filename: './index.html'
})
],
devServer: {
contentBase: './src',
overlay: true,
historyApiFallback: true
}
}