It's really interesting why there isstill global scope pollution in yoursamples of jquery-requirejs.Is this done with some purpose?
Anonymous: jQuery still registers as a global even when AMD is in use so that it is easier to step into named, localized dependencies without having to upgrade all of the libraries to use AMD.Also, there may be some scripts that are loaded in a page template that may still need to use jQuery via a global, but they may not be loaded by the AMD loader on the page. Think CMS page templates that need more time to upgrade to modular loading.I am hopeful that over time, the global registration could be removed. However, to avoid errors during this introduction phase, the global is still kept. It can be removed by calling noConflict in your top-level lib/app module if you know it is safe to do so.
Post a Comment