<disclaimer> Frusted by the state of JS handling in Plone 5 and the lack of JS related resources for porting Plone 4 add-ons to Plone 5. </disclaimer>
I tried today to port zopyx.plone.persistentlogger to Plone 5. In order to avoid any trouble with the legacy bundle (as it happened pretty often in the past with other add-ons) I moved all resources and all JS code into a single page template (no jsregistry.xml involved).
The same code is working with Plone 4.3, it is breaking with Plone 5.0:
Why is this happening? Why isn't is possible to support 3rd-party JS modules out-of-the-box in a reasonable way? I want to stress out again: no resource registries involved here. The complete JS situation in Plone 5 is a huge, huge mess. None out of six add-ons that I tried to port from Plone 4.3 to Plone 5 with custom JS code is actually working.
JS handling in Plone 5 is broken. If not, please explain why it is not and please explain how to deal with the situation.