Skip to content

Commit f599f84

Browse files
authored
Merge pull request #3562 from owenconti/ft/react-perf-permanent
Introduce React.Perf in all non-production builds.
2 parents e43c450 + 87f1a97 commit f599f84

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"promise-worker": "^1.1.1",
5454
"prop-types": "^15.5.10",
5555
"react": "^15.4.0",
56-
"react-addons-perf": "0.14.8",
56+
"react-addons-perf": "^15.4.0",
5757
"react-addons-shallow-compare": "0.14.8",
5858
"react-addons-test-utils": "^15.4.0",
5959
"react-collapse": "2.3.1",

src/core/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ import ApisPreset from "core/presets/apis"
66
import * as AllPlugins from "core/plugins/all"
77
import { parseSearch } from "core/utils"
88

9+
if (process.env.NODE_ENV !== "production") {
10+
const Perf = require("react-addons-perf")
11+
window.Perf = Perf
12+
}
13+
914
// eslint-disable-next-line no-undef
1015
const { GIT_DIRTY, GIT_COMMIT, PACKAGE_VERSION, HOSTNAME, BUILD_TIME } = buildInfo
1116

0 commit comments

Comments
 (0)