haul icon indicating copy to clipboard operation
haul copied to clipboard

Can Haul load modules dynamically like a React Native packager?

Open jasesuperhero opened this issue 7 years ago • 3 comments

React Native Packager can load modules dynamically. For example, we can load jsbundle to the app and use this code to load it to out app:

[RCTJavaScriptLoader loadBundleAtURL:PATH
                              onProgress:nil
                              onComplete:nil];

But with Haul (Webpack) we should describe all out paths in config file in entry section. Could Haul load bundles in runtime? Or Webpack? Sorry, if this question is some strange :(

jasesuperhero avatar Jan 22 '18 08:01 jasesuperhero

Webpack can definitely do that, not sure how it fits in to haul and react-native

hedgepigdaniel avatar Jan 22 '18 10:01 hedgepigdaniel

I think, that packager has their own server with some api. This api can build modules by theirs paths. In webpack we can use chunk to resolve this problem, but i wanna to know: can haul load modules with packager way (use some api)?

jasesuperhero avatar Jan 22 '18 17:01 jasesuperhero

Code splitting in RN is done differently than on web. I think this is a matter of Haul supporting RAM bundles. Definitely something we should explore.

thymikee avatar Apr 22 '18 20:04 thymikee