mirror of https://github.com/status-im/metro.git
Don't special case performanceNow
Summary: The previous version of `performanceNow` used to reassign to a `require(...)` alias, which our inline requires transform guarded against. Before the update to React 0.14, we were pulling `performanceNow` from a hardcoded `react-tools` version (b4e74e38e4/src/shared/vendor/performance/performanceNow.js
), so we couldn't just fix the file and had to special case it. Now that we've updated to React 0.14, `performanceNow` is pulled from fbjs and no longer needs to be special cased.
public
Reviewed By: cpojer
Differential Revision: D2634940
fb-gh-sync-id: 7085cde3179c04f9ecfd87bdd472b19e370ee73c
This commit is contained in:
parent
9d88303586
commit
839de43d3a
|
@ -17,11 +17,7 @@ function transform(src, filename, options) {
|
||||||
options = options || {};
|
options = options || {};
|
||||||
const plugins = [];
|
const plugins = [];
|
||||||
|
|
||||||
if (
|
if (options.inlineRequires) {
|
||||||
options.inlineRequires &&
|
|
||||||
// (TODO: balpert, cpojer): Remove this once react is updated to 0.14
|
|
||||||
!filename.endsWith('performanceNow.js')
|
|
||||||
) {
|
|
||||||
plugins.push({
|
plugins.push({
|
||||||
position: 'after',
|
position: 'after',
|
||||||
transformer: inlineRequires,
|
transformer: inlineRequires,
|
||||||
|
|
Loading…
Reference in New Issue