Upgrade Webpack

This commit is contained in:
Jordan Eldredge 2017-01-24 15:36:31 -08:00
parent 4bd28d0053
commit fde103fe4c
3 changed files with 14 additions and 8 deletions

View file

@ -50,7 +50,7 @@
"style-loader": "^0.13.1",
"travis-weigh-in": "^1.0.2",
"url-loader": "^0.5.7",
"webpack": "^1.14.0",
"webpack": "^2.2.0",
"webpack-dev-server": "^1.15.1"
},
"dependencies": {
@ -63,7 +63,8 @@
"react-dom": "^15.4.2",
"react-redux": "^5.0.2",
"redux": "^3.5.2",
"redux-thunk": "^2.1.0"
"redux-thunk": "^2.1.0",
"webpack": "^2.2.0"
},
"jest": {
"testRegex": "\\.test\\.js$",

View file

@ -2,22 +2,25 @@ const path = require('path');
module.exports = {
resolve: {
extensions: ['', '.js']
extensions: ['.js']
},
module: {
loaders: [
rules: [
{
test: /\.css$/,
loader: 'style-loader!css-loader'
use: [
'style-loader',
'css-loader'
]
},
{
test: /\.png$/i,
loader: 'url-loader?limit=100000'
use: 'url-loader?limit=100000'
},
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel' // 'babel-loader' is also a legal name to reference
use: 'babel-loader' // 'babel-loader' is also a legal name to reference
}
],
noParse: [

View file

@ -7,7 +7,9 @@ config.plugins = (config.plugins || []).concat([
NODE_ENV: JSON.stringify('production')
}
}),
new webpack.optimize.UglifyJsPlugin()
new webpack.optimize.UglifyJsPlugin({
sourceMap: true
})
]);
config.entry = (config.entry || []).concat([