Skip to content

Commit

Permalink
Don't inline-require Babel runtime helpers (#1774)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon authored Oct 31, 2023
1 parent 9f33bad commit 4a4106b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions patches/babel-preset-fbjs+3.4.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/node_modules/babel-preset-fbjs/plugins/inline-requires.js b/node_modules/babel-preset-fbjs/plugins/inline-requires.js
index b11fc83..e18661a 100644
--- a/node_modules/babel-preset-fbjs/plugins/inline-requires.js
+++ b/node_modules/babel-preset-fbjs/plugins/inline-requires.js
@@ -256,6 +256,7 @@ function getInlineableModule(path, state) {

return moduleName == null ||
state.ignoredRequires.has(moduleName) ||
+ moduleName.startsWith('@babel/runtime/') ||
isRequireInScope
? null
: { moduleName, requireFnName: fnName };

0 comments on commit 4a4106b

Please sign in to comment.