We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I had some trouble with RN 0.57.5, got the following error: Can't find variable a.
Can't find variable a
After looking around I solved it by patching the metro bundler in node_modules:
metro/src/JSTransformer/worker.js
--- worker.js 2018-11-21 14:46:01.271844624 -0700 +++ worker.js 2018-11-21 14:45:52.517615272 -0700 @@ -199,10 +199,10 @@ plugins.push([inlineRequiresPlugin, opts]); } - if (!options.dev) { - plugins.push([constantFoldingPlugin, opts]); - plugins.push([inlinePlugin, opts]); - } + // if (!options.dev) { + // plugins.push([constantFoldingPlugin, opts]); + plugins.push([inlinePlugin, opts]); + // } var _transformFromAstSync = transformFromAstSync(ast, "", { ast: true, babelrc: false,
Apply the code above with patch node_modules/metro/src/JSTransformer/worker.js ./<savethesnippetabove>.patch
patch node_modules/metro/src/JSTransformer/worker.js ./<savethesnippetabove>.patch
The text was updated successfully, but these errors were encountered:
Tracking the upstream issue here: facebook/metro#317
Sorry, something went wrong.
Note that constant folding only breaks the file produced by advanced compilation. You only need to tell the worker to avoid that particular file.
More detail in the issue on metro I reported a few weeks ago facebook/metro#291
No branches or pull requests
I had some trouble with RN 0.57.5, got the following error:
Can't find variable a
.After looking around I solved it by patching the metro bundler in node_modules:
metro/src/JSTransformer/worker.js
Apply the code above with
patch node_modules/metro/src/JSTransformer/worker.js ./<savethesnippetabove>.patch
The text was updated successfully, but these errors were encountered: