From 839de43d3a2512cdb3f17c4bcb701266fd810ab7 Mon Sep 17 00:00:00 2001 From: Bhuwan Khattar Date: Mon, 9 Nov 2015 18:30:31 -0800 Subject: [PATCH] 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 (https://github.com/facebook/react/blob/b4e74e38e43ac53af8acd62c78c9213be0194245/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 --- transformer.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/transformer.js b/transformer.js index 7109574e..b07e7b5e 100644 --- a/transformer.js +++ b/transformer.js @@ -17,11 +17,7 @@ function transform(src, filename, options) { options = options || {}; const plugins = []; - if ( - options.inlineRequires && - // (TODO: balpert, cpojer): Remove this once react is updated to 0.14 - !filename.endsWith('performanceNow.js') - ) { + if (options.inlineRequires) { plugins.push({ position: 'after', transformer: inlineRequires,