[dojo-contributors] Loader-less builds?

James Burke jburke at dojotoolkit.org
Thu Mar 10 16:51:26 EST 2011

On Thu, Mar 10, 2011 at 1:27 PM, Kris Zyp <kzyp at dojotoolkit.org> wrote:
> Along the lines of creating more compressible (with Closure or other
> future tools) and lighter builds, I was wondering if any of our build
> tools could ever create builds that directly generated variables from
> modules in such a way as to make the connections more visible to code
> compressors and avoiding even needing a module loader. Here is an
> example of what I mean:
> https://gist.github.com/864958

It may be safer to embed a mini-require/define implementation to do
the string-to-object lookup, in particular for plugin-inlined modules
-- they do not have a natural JS variable to map them to. Something
like what is done in Ace[1], or what CoffeeScript does for building
its browser friendly version[2]. I'm not sure if that limits some of
the optimizations Closure Compiler can do, but it would likely have
fewer edge case breakages.

[1] https://github.com/mozilla/ace/blob/master/build_support/mini_require.js
[2] https://github.com/jashkenas/coffee-script/blob/master/Cakefile#L88


More information about the dojo-contributors mailing list