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

App size is large #30

Open
rueiwoqp opened this issue Dec 28, 2020 · 3 comments
Open

App size is large #30

rueiwoqp opened this issue Dec 28, 2020 · 3 comments

Comments

@rueiwoqp
Copy link

My app, though very small in terms of my code, is 200MB which is mostly due to node-libs-react-native. Is there any way to reduce the size? Are all libraries required or would is it possible to disable some of them?

@parshap
Copy link
Owner

parshap commented Dec 28, 2020

I haven't personally run into this problem, can you provide more information? Are you seeing this as your node_module size, your app bundle size, or your overall app binary size? Are you able to tell which dependency is causing the bloat?

@rueiwoqp
Copy link
Author

It is the .ipa size. I tried using https://github.com/IjzerenHein/react-native-bundle-visualizer but I get an error with node-libs-react-native when I run the command:

npx react-native-bundle-visualizer --expo managed

I get:

Error: Unable to resolve module `stream` from `node_modules/ccxt/js/static_dependencies/node-fetch/index.js`: stream could not be found within the project.

However, the visualizer used to work and it showed node-libs-react-native as a large dependency.

@parshap
Copy link
Owner

parshap commented Dec 29, 2020

I apologize as I'm not currently actively developing in React Native and can't investigate this further right now. The bloat is indeed coming from node-libs-react-native, it's most likely one of the native dependencies. In theory you should to identify and remove that dependency. You can also try copying the contents of index.js from this repo to your app and include only the modules that you need.

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

No branches or pull requests

2 participants