Stanislav Malyshev wrote:
Arnaud Limbourg wrote:
You can also have a build mechanism that removes all the require
statement and move them to one file. That way you can load all the
files you need up front, at least those you use the most.
That definitely can be done, and for some sites it might be a good
solution. Though it assumes you site requirements actually warrant the
trouble and that most of applications on your site share the same set of
used files. And of course you would have to rebuild the main file if you
change some names or requirements or refactor, etc. - which is too easy
to forget :)
True, that is why I use a script to deploy that does things like
minifying the javascript and other things like that.
Arnaud.