Look Ma! No Resource Registries

Well, after some studies, I got some glue on what is going on in Plone 5 environments:

  1. output.libraryExport = 'default': this options was needed due a wrong assumption in our library configuration, and we can safety remove it changing a little bit our configuration.
  2. Mismatched anonymous define() module: This bug can be fixed adding the option output.libraryTarget = 'umd' and output.umdNamedDefine = true, but this lead to another problem.. RequireJS compatible libraries (UMD and AMD) work different from our addons, it don't execute the code while not required, and this makes some initialization code don't run (for example jquery document ready event is not assigned), what make me think again if a library is what we need.
  3. output.libraryTarget = 'var': In other hand, this option give us the best of the two worlds, we can access our library modules outside the library code (to integrate with youtube api for example we have an use case that need this), extending the code, or maybe it is even possible to do a monkey patch, and also it is possible to run some initialization code. Since now, the only little drawback noticed is that the library is added in a global variable with the library name, what I don't see like a problem in our addons use case.