Skip to content

Commit

Permalink
Rename react-is import alias in FB bundles (#12459)
Browse files Browse the repository at this point in the history
  • Loading branch information
bvaughn authored Mar 27, 2018
1 parent 718d0d2 commit 90c41a2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/rollup/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,9 @@ function getPlugins(
// www still needs require('React') rather than require('react')
isFBBundle && {
transformBundle(source) {
return source.replace(/require\(['"]react['"]\)/g, "require('React')");
return source
.replace(/require\(['"]react['"]\)/g, "require('React')")
.replace(/require\(['"]react-is['"]\)/g, "require('ReactIs')");
},
},
// Apply dead code elimination and/or minification.
Expand Down

0 comments on commit 90c41a2

Please sign in to comment.