Update to webpack 4

This commit is contained in:
Michael "Z" Goddard 2018-05-07 12:40:37 -04:00
parent 6cbe1b9e0f
commit df13e181eb
No known key found for this signature in database
GPG key ID: 762CD40DD5349872
2 changed files with 7 additions and 5 deletions

View file

@ -24,7 +24,7 @@
"audio-context": "1.0.1",
"babel-core": "^6.24.1",
"babel-eslint": "^7.2.2",
"babel-loader": "^6.4.1",
"babel-loader": "^7.1.4",
"babel-preset-es2015": "^6.24.1",
"eslint": "^3.19.0",
"eslint-config-scratch": "^3.1.0",
@ -33,6 +33,7 @@
"soundfont-player": "0.10.5",
"startaudiocontext": "1.2.1",
"travis-after-all": "^1.4.4",
"webpack": "2.4.0"
"webpack": "^4.8.0",
"webpack-cli": "^2.0.15"
}
}

View file

@ -1,6 +1,7 @@
var path = require('path');
module.exports = {
mode: process.env.NODE_ENV === 'production' ? 'production' : 'development',
devtool: 'cheap-module-source-map',
entry: {
dist: './src/index.js'
@ -12,11 +13,11 @@ module.exports = {
filename: '[name].js'
},
module: {
loaders: [{
rules: [{
test: /\.js$/,
loader: 'babel-loader',
include: path.resolve(__dirname, 'src'),
query: {
loader: 'babel-loader',
options: {
presets: ['es2015']
}
}]