livereactload icon indicating copy to clipboard operation
livereactload copied to clipboard

Support factory-bundle

Open yborunov opened this issue 8 years ago • 4 comments

I'm using factory-bundle browserify plugin to break down my code into separate bundles and a common file for all pages. It works fine until I add livereactload. Because livereactload doesn't know how to deal with separated bundles. Is the a way to reconcile livereactload and factory-bundle?

yborunov avatar Mar 15 '16 14:03 yborunov

Hi! Unfortunately this feature would require some heavy upgrades to the codebase and I've got no time for such big changes (I'm sorry! :disappointed:)

Keeping this issue open, if someone figures out to implement this. PR's welcome!

milankinen avatar Mar 26 '16 22:03 milankinen

Hey, I understand, we all have day jobs. The only temporary solution I came up with is to have several browserify tasks to build separate bundles, but it doesn't create a common file, though. Even so, livereactload gives me more convenience, so I had to decide in its favor.

Hope someone or even me find time to dig into this problem and implement a solution. I'll have to wrap my head around browerify plugins API to do that, have no idea how it works so far.

yborunov avatar Mar 26 '16 23:03 yborunov

It's been a while since this issue is reported, I just wanna explain my workaround in case it helps others. I'm not using factor bundle, I'm using a manual partitioning method but I had this problem with my manual method too. My workaround is to use different bundling methods for development and production. For production I create all the ~12 bundles but for development I create only 2 (it could be one, but for technical irrelevant details in my project it's 2.) It's been like this for 7 months and had no problem. The only problem is this way you can't debug your partitioning method in your development setup. You should occasionally need to do so (specially if you're using factor-bundle and not a manual method) but in case you need to do so you can disable livereactload and use the same bundling method you use in production temporarily.

sassanh avatar Feb 23 '17 21:02 sassanh

Nice to hear that you've found a solution that works in your case and thank you for sharing it! These kind of infos are valuable. 👍

milankinen avatar Feb 24 '17 18:02 milankinen