Преглед на файлове

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

Introduce React.Perf in all non-production builds.
bubble
Kyle преди 7 години
committed by GitHub
родител
ревизия
f599f84f01
променени са 2 файла, в които са добавени 6 реда и са изтрити 1 реда
  1. +1
    -1
      package.json
  2. +5
    -0
      src/core/index.js

+ 1
- 1
package.json Целия файл

@@ -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",


+ 5
- 0
src/core/index.js Целия файл

@@ -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



Зареждане…
Отказ
Запис