This is the same issue as #22 and #14. I'm just opening a new one as they haven't really been resolved. Yes, this suggests adding cjs extensions to the resolver but it still doesn't really work in Metro bundler (at least not in my setup, tried). The problem is that metro bundler doesn't support exports and needs main. What does work and what the proper solution is, is for copy-anything (and your other packages including is-what) to just add a main field to package.json:
--- a/copy-anything/package.json 2025-12-10 16:51:35.153764705 +0000
+++ b/copy-anything/package.json 2025-12-10 16:50:49.741779711 +0000
@@ -4,6 +4,7 @@
"description": "An optimised way to copy'ing an object. A small and simple integration",
"type": "module",
"sideEffects": false,
+ "main": "./dist/index.js",
"exports": {
".": "./dist/index.js"
},
This is the same issue as #22 and #14. I'm just opening a new one as they haven't really been resolved. Yes, this suggests adding
cjsextensions to the resolver but it still doesn't really work in Metro bundler (at least not in my setup, tried). The problem is that metro bundler doesn't supportexportsand needsmain. What does work and what the proper solution is, is forcopy-anything(and your other packages includingis-what) to just add amainfield topackage.json: