Is it possible to shim Node's fs.readFileSync() in React Native?
问题 I want to port a number of packages written for NodeJS to React Native. For this purpose I created a RN project using the popular Ignite boilerplate, then used the ReactNativify method and shim Node API objects mostly reusing existing browserify shims. (For details and some useful tips see Can we use nodejs code inside react native application?) Some Node objects are still replaced with empty mocks after transpilation, such as fs . Done in .babelrc as follows: ["module-resolver", { "alias": {