Update webpack file template for latest version

Webpack 4 has some syntax changes, mainly using rules key instead of plugin.
This commit is contained in:
allforabit 2018-03-26 22:27:09 +01:00 committed by GitHub
parent bc7c992f43
commit 98a4a94867
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,9 +7,15 @@ module.exports = {
filename: "app.bundle.js"
},
module: {
loaders: [
{ test: /\.js$/, include: __dirname + '/app', loader: 'babel-loader' }$0
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: "babel-loader"
}
}
]
}
},
// plugins: []
};
};