dillon1000/react

Commit

FB bundles wrap warning() calls in __DEV__ (#10314)

FB bundles wrap warning() calls in __DEV__

Split dev-mode transforms into separate parts:
1) umd+cjs+fb: Wrap warning calls with process.env checks
2) umd+cjs: Replace error messages with minified codes

Also updated transforms to use __DEV__ since it transforms to smaller code after stripEnvVariables is run.

Also renamed 'scripts/error-codes/dev-expression-with-codes.js' -> 'scripts/error-codes/replace-invariant-error-codes.js'
Browse files
Changed paths9 files
First-parent comparison
M docs/_posts/2016-07-11-introducing-reacts-error-code-system.md ModifiedM scripts/error-codes/README.md ModifiedM scripts/error-codes/__tests__/dev-expression-with-codes-test.js ModifiedR scripts/error-codes/dev-expression-with-codes.js →scripts/error-codes/replace-invariant-error-codes.js RenamedM scripts/fiber/tests-passing.txt ModifiedM scripts/jest/preprocessor.js ModifiedM scripts/rollup/build.js ModifiedA scripts/rollup/plugins/__tests__/wrap-warning-with-env-check-test.js AddedA scripts/rollup/plugins/wrap-warning-with-env-check.js Added
Patch

Files changed

Rendering syntax-highlighted changes…