Skip to content
This repository was archived by the owner on Mar 7, 2019. It is now read-only.

Commit b9fc6af

Browse files
authored
Update dependencies (#46)
1 parent c7d0c2d commit b9fc6af

File tree

3 files changed

+2427
-1369
lines changed

3 files changed

+2427
-1369
lines changed

package.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
"build": "npm run build:commonjs && npm run build:es && npm run build:umd && npm run build:umd-min",
1717
"build:commonjs": "cross-env BABEL_ENV=commonjs babel src --out-dir lib",
1818
"build:es": "cross-env BABEL_ENV=es babel src --out-dir es",
19-
"build:umd": "cross-env BABEL_ENV=commonjs NODE_ENV=development webpack src/index.js dist/react-handler.js",
20-
"build:umd-min": "cross-env BABEL_ENV=commonjs NODE_ENV=production webpack src/index.js dist/react-handler.min.js",
19+
"build:umd": "cross-env BABEL_ENV=commonjs NODE_ENV=development webpack src/index.js --o dist/react-handler.js",
20+
"build:umd-min": "cross-env BABEL_ENV=commonjs NODE_ENV=production webpack src/index.js --o dist/react-handler.min.js",
2121
"clean": "rimraf es dist lib coverage",
2222
"lint": "standard --verbose | snazzy",
2323
"prepublish": "npm run test && npm run clean && npm run build",
@@ -38,20 +38,21 @@
3838
"babel-cli": "^6.18.0",
3939
"babel-core": "^6.21.0",
4040
"babel-eslint": "^8.0.0",
41-
"babel-jest": "^21.0.2",
41+
"babel-jest": "^23.0.1",
4242
"babel-loader": "^7.1.1",
4343
"babel-plugin-transform-object-rest-spread": "^6.20.2",
4444
"babel-preset-es2015": "^6.18.0",
4545
"babel-preset-react": "^6.16.0",
4646
"cross-env": "^5.0.0",
47-
"jest": "^21.0.1",
47+
"jest": "^23.1.0",
4848
"prop-types": "^15.5.10",
4949
"react": "^16.0.0",
5050
"react-test-renderer": "^16.0.0",
5151
"rimraf": "^2.5.4",
5252
"snazzy": "^7.0.0",
53-
"standard": "^10.0.1",
54-
"webpack": "^3.0.0"
53+
"standard": "^11.0.1",
54+
"webpack": "^4.11.1",
55+
"webpack-cli": "^3.0.3"
5556
},
5657
"peerDependencies": {
5758
"react": "^16.0.0"

webpack.config.js

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ const env = process.env.NODE_ENV
44

55
const config = {
66
module: {
7-
loaders: [
7+
rules: [
88
{ test: /\.js$/, loaders: ['babel-loader'], exclude: /node_modules/ }
99
]
1010
},
11+
mode: env,
1112
output: {
1213
library: 'react-handler',
1314
libraryTarget: 'umd'
1415
},
1516
plugins: [
16-
new webpack.optimize.OccurrenceOrderPlugin(),
1717
new webpack.DefinePlugin({
1818
'process.env.NODE_ENV': JSON.stringify(env)
1919
})
@@ -28,17 +28,4 @@ const config = {
2828
}
2929
}
3030

31-
if (env === 'production') {
32-
const uglifyJS = new webpack.optimize.UglifyJsPlugin({
33-
compressor: {
34-
pure_getters: true,
35-
unsafe: true,
36-
unsafe_comps: true,
37-
warnings: false
38-
}
39-
})
40-
41-
config.plugins.push(uglifyJS)
42-
}
43-
4431
module.exports = config

0 commit comments

Comments
 (0)