Skip to content

Commit

Permalink
Add react-refresh as a dependency
Browse files Browse the repository at this point in the history
Summary:
This adds the Fresh Babel plugin and runtime to React Native dependencies. **They're not actually being used or enabled yet**. This is purely additive and just gets the deps setup out of the way for future diffs.

The `react-refresh` source of truth is in the React repo.

Reviewed By: cpojer

Differential Revision: D15828330

fbshipit-source-id: 67ec2dea8c896477ff8b434445f1730e388ea67a
  • Loading branch information
gaearon authored and facebook-github-bot committed Jun 17, 2019
1 parent 6fef480 commit 1284c5d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Libraries/Core/setUpDeveloperTools.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ if (__DEV__) {
if (typeof reload !== 'function') {
throw new Error('Could not find the reload() implementation.');
}
(require: any).reload = reload; // flowlint-line unclear-type: off
// flowlint-next-line unclear-type: off
(require: any).reload = reload;
// flowlint-next-line unclear-type: off
(require: any).hot = {
Runtime: require('react-refresh/runtime'),
};
}
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
"promise": "^7.1.1",
"prop-types": "^15.7.2",
"react-devtools-core": "^3.6.0",
"react-refresh": "0.0.3",
"regenerator-runtime": "^0.13.2",
"stacktrace-parser": "^0.1.3",
"whatwg-fetch": "^3.0.0"
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5925,6 +5925,11 @@ react-proxy@^1.1.7:
lodash "^4.6.1"
react-deep-force-update "^1.0.0"

react-refresh@0.0.3:
version "0.0.3"
resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.0.3.tgz#977bcc5c2235d3ee94ded83e5fa5ca8fc591c6a8"
integrity sha512-m6VDuLteHYjnnQlEK21LDovkyBY7VS3tqArwHMAnmF7WzBbIw135OiG4IDkUnxI2Og+vbUaF+EqQc9V5DHQ8gg==

react-test-renderer@16.8.6:
version "16.8.6"
resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-16.8.6.tgz#188d8029b8c39c786f998aa3efd3ffe7642d5ba1"
Expand Down

0 comments on commit 1284c5d

Please sign in to comment.