Introduce React.Perf in all non-production builds.
This commit is contained in:
@@ -49,7 +49,7 @@
|
|||||||
"promise-worker": "^1.1.1",
|
"promise-worker": "^1.1.1",
|
||||||
"prop-types": "^15.5.10",
|
"prop-types": "^15.5.10",
|
||||||
"react": "^15.4.0",
|
"react": "^15.4.0",
|
||||||
"react-addons-perf": "0.14.8",
|
"react-addons-perf": "15.4.2",
|
||||||
"react-addons-shallow-compare": "0.14.8",
|
"react-addons-shallow-compare": "0.14.8",
|
||||||
"react-addons-test-utils": "^15.4.0",
|
"react-addons-test-utils": "^15.4.0",
|
||||||
"react-collapse": "2.3.1",
|
"react-collapse": "2.3.1",
|
||||||
|
|||||||
@@ -6,6 +6,11 @@ import ApisPreset from "core/presets/apis"
|
|||||||
import * as AllPlugins from "core/plugins/all"
|
import * as AllPlugins from "core/plugins/all"
|
||||||
import { parseSearch } from "core/utils"
|
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
|
// eslint-disable-next-line no-undef
|
||||||
const { GIT_DIRTY, GIT_COMMIT, PACKAGE_VERSION, HOSTNAME, BUILD_TIME } = buildInfo
|
const { GIT_DIRTY, GIT_COMMIT, PACKAGE_VERSION, HOSTNAME, BUILD_TIME } = buildInfo
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user