Open sjkushwaha21 opened 1 week ago
@sjkushwaha21 What problem did this solve for you?
Hi @johnf,
Changing module.exports = { pick, omit }; To export { omit, pick };
Helped my issue.
Hi @johnf,
Changing module.exports = { pick, omit }; To export { omit, pick };
Helped my issue.
You could clean up your patch file by only including:
diff --git a/node_modules/react-native-vector-icons/lib/object-utils.js b/node_modules/react-native-vector-icons/lib/object-utils.js
index d03b55b..712b89b 100644
--- a/node_modules/react-native-vector-icons/lib/object-utils.js
+++ b/node_modules/react-native-vector-icons/lib/object-utils.js
@@ -17,4 +17,4 @@ const omit = (obj, ...keysToOmit) => {
}, {});
};
-module.exports = { pick, omit };
+export { omit, pick };
But, this looks more like a config issue you can solve here without having to patch, CJS/ESM thing. module.exports
is for CJS modules which are pulled into other code via require. export
is for ESM modules, which are pulled in via import.
It would be good to know what your issue was not just the fix.
Hi @johnf, @david-gettins
I am facing following issue. Please find the attachment as you requested.
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch
react-native-vector-icons@10.1.0
for the project I'm working on.Here is the diff that solved my problem:
This issue body was partially generated by patch-package.