Skip to content

Commit 1497271

Browse files
pgoldthoshockey
authored andcommitted
housekeeping: remove react-addons-perf dependency (via #5229)
* Remove react-addons-perf dependency * update lockfile * include ReactPerf in non-production builds
1 parent c6d1cc9 commit 1497271

File tree

5 files changed

+18
-50
lines changed

5 files changed

+18
-50
lines changed

make-webpack-config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ module.exports = function(rules, options) {
7272
new UglifyJsPlugin({
7373
uglifyOptions: {
7474
mangle: specialOptions.mangle,
75-
compress: specialOptions.mangle,
75+
compress: specialOptions.mangle ? {
76+
dead_code: true
77+
} : false,
7678
beautify: !specialOptions.mangle,
7779
},
7880

package-lock.json

Lines changed: 14 additions & 44 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@
6363
"memoizee": "^0.4.12",
6464
"prop-types": "^15.5.10",
6565
"react": "^15.6.2",
66-
"react-addons-perf": "^15.4.0",
6766
"react-debounce-input": "^3.2.0",
6867
"react-dom": "^15.6.2",
6968
"react-immutable-proptypes": "2.1.0",

src/core/components/debug.jsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import React from "react"
22
import PropTypes from "prop-types"
33
import { presets } from "react-motion"
44
import ObjectInspector from "react-inspector"
5-
import Perf from "react-addons-perf"
65

76
export default class Debug extends React.Component {
87

@@ -15,7 +14,6 @@ export default class Debug extends React.Component {
1514
e.preventDefault()
1615
this.setState({jsonDumpOpen: !this.state.jsonDumpOpen})
1716
}
18-
window.Perf = Perf
1917
}
2018

2119
plusOrMinus(bool) {
@@ -51,4 +49,3 @@ Debug.propTypes = {
5149
getState: PropTypes.func.isRequired,
5250
getComponent: PropTypes.func.isRequired,
5351
}
54-

src/core/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import * as AllPlugins from "core/plugins/all"
88
import { parseSearch } from "core/utils"
99

1010
if (process.env.NODE_ENV !== "production" && typeof window !== "undefined") {
11-
win.Perf = require("react-addons-perf")
11+
win.Perf = require("react-dom/lib/ReactPerf")
1212
}
1313

1414
// eslint-disable-next-line no-undef

0 commit comments

Comments
 (0)