The most notable changes:
- require.js: fix for a 'use strict' issue in Safari 6: should only show up in certain non-optimized scenarios.
- r.js optimizer: changed over to esprima for all dependency tracing. This set the stage for allowing some forms of JavaScript 1.8 to be optimized, with the help of some regexps.
I have tried to make my Javascript library compatible with AMD loaders, but how does someone 'require' what I have 'defined' in my library, if it is anonymous? What am I missing?
ReplyDeleteAnonymous: anonymous modules are given a name by the modules that call them, by the dependency name they used. So if a module does require('foo'), then your anonymous module's exported value will be stored for the module ID 'foo' in the loader.
ReplyDelete