JS bundles of bundles in Plone 5.0.5

I have a package that uses the jquery upload js from blueimp and registers it with jsregistry.xml (plone-legacy), and then my own code that executes it. It works in Plone 5.0 but not in Plone 5.0.5 - no errors are thrown, but $('#myid').fileupload isn't defined, among other things.

Looking at the network tab I see that plone-legacy.js is no longer downloaded independently. I think all bundles that have the same conditions are being merged into a single file, default.js? I've had problems before where some js files don't place with others and I imagine something like that is happening here. If I switch to debug mode it seems to stop this merging behavior and all of my js works as expected.

There is a LOT going on here and in the past (Plone 4) I would probably just mark a particular js file as not-mergeable. The extra network call is normally trivial compared to the amount of development time required to be a javascript/requirejs expert. Is there a way to prevent a merge of the plone-legacy bundle with other bundles?

That can be done in your profile, in registry.xml, you just need to re-declare the plone-legacy bundle like this:

but change the merge_with value to nothing (empty value), and plone-legacy will not be merged anymore.

Note: I would not recommend to put resources in plone-legacy (it works well with legacy Plone core stuff but not that much with add-ons). It is safer to declare actual resources, and it does not imply to be a RequireJS expert, see this example: