Skip to content
New issue

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

Aliasing invariant and warning as rn-nodeify breaks resolution. #3

Merged
merged 1 commit into from
Jan 30, 2017

Conversation

alexwilson
Copy link
Owner

@alexwilson alexwilson commented Dec 29, 2016

Running rn-nodeify --install replaces the module definitions used by Facebook's invariant and warning modules, which breaks their resolution.

e.g.

diff -u -r node_modules/invariant/package.json npm_mods/invariant/package.json
--- node_modules/invariant/package.json 2016-12-29 21:03:59.000000000 +0000
+++ npm_mods/invariant/package.json     2016-12-29 21:03:27.000000000 +0000
@@ -23,56 +23,10 @@
     "tap": "^1.4.0"
   },
   "main": "invariant.js",
-  "browser": {
-    "invariant.js": "browser.js",
-    "zlib": "browserify-zlib",
-    "console": "console-browserify",
-    "constants": "constants-browserify",
-    "crypto": "react-native-crypto",
-    "dns": "dns.js",
-    "net": "react-native-tcp",
-    "domain": "domain-browser",
-    "http": "react-native-http",
-    "https": "https-browserify",
-    "os": "os-browserify",
-    "path": "path-browserify",
-    "querystring": "querystring-es3",
-    "fs": "react-native-level-fs",
-    "_stream_transform": "readable-stream/transform",
-    "_stream_readable": "readable-stream/readable",
-    "_stream_writable": "readable-stream/writable",
-    "_stream_duplex": "readable-stream/duplex",
-    "_stream_passthrough": "readable-stream/passthrough",
-    "dgram": "react-native-udp",
-    "stream": "stream-browserify",
-    "timers": "timers-browserify",
-    "tty": "tty-browserify",
-    "vm": "vm-browserify"
-  },
-  "react-native": {
-    "invariant.js": "browser.js",
-    "zlib": "browserify-zlib",
-    "console": "console-browserify",
-    "constants": "constants-browserify",
-    "crypto": "react-native-crypto",
-    "dns": "dns.js",
-    "net": "react-native-tcp",
-    "domain": "domain-browser",
-    "http": "react-native-http",
-    "https": "https-browserify",
-    "os": "os-browserify",
-    "path": "path-browserify",
-    "querystring": "querystring-es3",
-    "fs": "react-native-level-fs",
-    "_stream_transform": "readable-stream/transform",
-    "_stream_readable": "readable-stream/readable",
-    "_stream_writable": "readable-stream/writable",
-    "_stream_duplex": "readable-stream/duplex",
-    "_stream_passthrough": "readable-stream/passthrough",
-    "dgram": "react-native-udp",
-    "stream": "stream-browserify",
-    "timers": "timers-browserify",
-    "tty": "tty-browserify",
-    "vm": "vm-browserify"
+  "browser": "browser.js",
+  "browserify": {
+    "transform": [
+      "loose-envify"
+    ]
   }
-}
\ No newline at end of file

@alexwilson alexwilson merged commit fbbbb07 into master Jan 30, 2017
@alexwilson alexwilson deleted the fix/aliasing-invariant-warning branch January 30, 2017 00:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant