Don't transform node_modules in open source
Summary: We aren't ignoring node_modules so we apply our transform on *all of them*. See https://github.com/facebook/react-native/pull/2942 and https://github.com/facebook/react-native/issues/2939 @public Reviewed By: @vjeux Differential Revision: D2467324
This commit is contained in:
parent
a50b4ea7b9
commit
cee01bef4f
|
@ -14,6 +14,16 @@ const transformer = require('../packager/transformer.js');
|
|||
|
||||
module.exports = {
|
||||
process(src, file) {
|
||||
// Don't transform node_modules, except react-tools which includes the
|
||||
// untransformed copy of React
|
||||
if (
|
||||
file.match(/node_modules\/(?!react-tools\/)/) ||
|
||||
// (TODO: balpert, cpojer): Remove this once react is updated to 0.14
|
||||
file.endsWith('performanceNow.js')
|
||||
) {
|
||||
return src;
|
||||
}
|
||||
|
||||
return transformer.transform(src, file).code;
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue