Merge pull request #3562 from owenconti/ft/react-perf-permanent
Introduce React.Perf in all non-production builds.
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user