Merge pull request #3562 from owenconti/ft/react-perf-permanent

Introduce React.Perf in all non-production builds.
This commit is contained in:
Kyle
2017-08-11 17:41:49 -07:00
committed by GitHub
2 changed files with 6 additions and 1 deletions

View File

@@ -53,7 +53,7 @@
"promise-worker": "^1.1.1",
"prop-types": "^15.5.10",
"react": "^15.4.0",
"react-addons-perf": "0.14.8",
"react-addons-perf": "^15.4.0",
"react-addons-shallow-compare": "0.14.8",
"react-addons-test-utils": "^15.4.0",
"react-collapse": "2.3.1",

View File

@@ -6,6 +6,11 @@ import ApisPreset from "core/presets/apis"
import * as AllPlugins from "core/plugins/all"
import { parseSearch } from "core/utils"
if (process.env.NODE_ENV !== "production") {
const Perf = require("react-addons-perf")
window.Perf = Perf
}
// eslint-disable-next-line no-undef
const { GIT_DIRTY, GIT_COMMIT, PACKAGE_VERSION, HOSTNAME, BUILD_TIME } = buildInfo