-
Notifications
You must be signed in to change notification settings - Fork 61
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
Multi-bundle support #146
Comments
Hi! Just trying to understand the use case:
|
Looking over my initial proposal, I see I didn't clearly state the primary objective. So to clarify... Primary use case: To answer your questions:
If anything's unclear, let me know. |
I also have a project this change would help a lot. I am building multiple Browserify bundles from different repositories, and currently only use LiveReactload in the primary package, so I lose development cycles on the submodules. Looking over @pizza2code's proposal, I believe it would work for me, too, as I can specify a |
Hmmm, interesting. I'm definitely interested in this if we manage to get this working properly. 👍 How are the inter-bundle dependencies solved? I.e. when I change something in the bundle |
I'd like to propose support for multiple LiveReactload bundles in separate browserify/watchify processes:
Reasoning
I'm developing HTML5 GUIs in a large codebase with a number of internal libraries. Hot-reloading needs to occur quickly for both lib changes and changes to the GUI code itself, but presently watchify is not quick to incrementally build one giant bundle. When we split the code into several smaller bundles, watchify is much quicker to rebundle code changes. Additionally, building the bundles in separate processes allows us to speed up the initial non-incremental build.
I believe this is also a step toward #107 (Support factory-bundle), though multiple-entry support is beyond the scope of my proposal here.
Method
patch()
,evaluate()
, andload()
on a global__livereactload_export
object. Before assigning to that global, any existing__livereactload_export
is assigned to aloader()
-scoped variablepreviousBundle
, which creates the descending chain of exposed functions I mentioned above.bundleId
for each bundle. This also signifies that we're using multi-bundle mode. (Better way to do this? Plugin access to dest filename?)Usage Example
I've been working up to this change with the previous smaller issues. Any suggestions on the API? I'm mostly finished the capability, and making this issue to check whether you wish to integrate these changes. I would rather help maintain this as part of the official LiveReactload, but I respect that it's your call to make.
The text was updated successfully, but these errors were encountered: