Wednesday, February 22, 2012

RequireJS 1.0.7 released

RequireJS 1.0.7 is available.

The fixes are almost all optimizer fixes. There was a fix for a bad source overwriting bug when "appDir" and "mainConfigFile" were used together when mainConfigFile had a paths config.

Release Notes

2 comments:

Anonymous said...

It's really interesting why there is
still global scope pollution in your
samples of jquery-requirejs.

Is this done with some purpose?

James Burke said...

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.