Skip to content

Commit 970b0d1

Browse files
committed
Upgrade webpack to 2 and other deps too
1 parent 857cf4d commit 970b0d1

File tree

4 files changed

+1608
-1911
lines changed

4 files changed

+1608
-1911
lines changed

.eslintrc

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
11
{
2-
"extends": "rackt",
3-
"rules": {
4-
"react/jsx-uses-react": 1,
5-
"react/jsx-no-undef": 2,
6-
"react/wrap-multilines": 2
7-
},
8-
"plugins": [
9-
"react"
10-
]
2+
"extends": "react-app"
113
}

package.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"devDependencies": {
4444
"babel-cli": "^6.1.2",
4545
"babel-core": "^6.7.4",
46-
"babel-eslint": "^4.1.6",
46+
"babel-eslint": "^7.1.1",
4747
"babel-loader": "^6.2.0",
4848
"babel-plugin-transform-es3-member-expression-literals": "^6.5.0",
4949
"babel-plugin-transform-es3-property-literals": "^6.5.0",
@@ -52,32 +52,32 @@
5252
"babel-preset-react": "^6.5.0",
5353
"babel-preset-stage-1": "^6.3.13",
5454
"babel-register": "^6.4.3",
55-
"eslint": "^1.10.3",
56-
"eslint-config-rackt": "^1.1.1",
57-
"eslint-plugin-react": "^3.15.0",
55+
"eslint": "^3.15.0",
56+
"eslint-config-react-app": "^0.5.0",
57+
"eslint-plugin-flowtype": "^2.29.2",
58+
"eslint-plugin-import": "^2.2.0",
59+
"eslint-plugin-jsx-a11y": "^4.0.0",
60+
"eslint-plugin-react": "^6.8.0",
5861
"expect": "^1.13.0",
5962
"history": "^3.0.0",
6063
"isparta": "^4.0.0",
6164
"isparta-loader": "^2.0.0",
62-
"karma": "^0.13.3",
63-
"karma-chrome-launcher": "^0.2.0",
64-
"karma-coverage": "^0.5.3",
65-
"karma-firefox-launcher": "^0.1.7",
66-
"karma-ie-launcher": "^0.2.0",
67-
"karma-mocha": "^0.2.0",
68-
"karma-mocha-reporter": "^1.0.4",
69-
"karma-safari-launcher": "^0.1.1",
65+
"karma": "^1.4.1",
66+
"karma-coverage": "^1.1.1",
67+
"karma-firefox-launcher": "^1.0.0",
68+
"karma-mocha": "^1.3.0",
69+
"karma-mocha-reporter": "^2.2.2",
7070
"karma-sourcemap-loader": "^0.3.5",
71-
"karma-webpack": "^1.7.0",
72-
"mocha": "^2.3.4",
73-
"react": "^0.14.3",
74-
"react-dom": "^0.14.3",
75-
"react-redux": "^4.4.0",
71+
"karma-webpack": "^2.0.2",
72+
"mocha": "^3.2.0",
73+
"react": "^15.4.2",
74+
"react-dom": "^15.4.2",
75+
"react-redux": "^5.0.2",
7676
"react-router": "^3.0.0",
7777
"redux": "^3.0.4",
7878
"redux-devtools": "^3.0.0",
7979
"redux-devtools-dock-monitor": "^1.0.1",
8080
"redux-devtools-log-monitor": "^1.0.1",
81-
"webpack": "^1.12.9"
81+
"webpack": "^2.2.1"
8282
}
8383
}

webpack.config.js

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,21 @@ var webpack = require('webpack')
33
var config = {
44
entry: './src/index',
55
module: {
6-
loaders: [
7-
{ test: /\.js$/, loaders: [ 'babel' ], exclude: /node_modules/ }
6+
rules: [
7+
{ test: /\.js$/, use: [ 'babel-loader' ], exclude: /node_modules/ }
88
]
99
},
1010
output: {
1111
library: 'ReactRouterRedux',
1212
libraryTarget: 'umd'
13-
},
14-
plugins: [
15-
new webpack.optimize.OccurenceOrderPlugin()
16-
]
13+
}
1714
}
1815

1916
if (process.env.NODE_ENV === 'production') {
20-
config.plugins.push(
21-
new webpack.optimize.UglifyJsPlugin({
22-
compressor: {
23-
warnings: false
24-
}
25-
})
26-
)
17+
config.plugins = [
18+
new webpack.optimize.UglifyJsPlugin({ sourceMap: true }),
19+
new webpack.LoaderOptionsPlugin({ minimize: true })
20+
]
2721
}
2822

2923
module.exports = config

0 commit comments

Comments
 (0)