I’m hoping to load jquery, jqueryUI, underscore & backbone, and non-AMD jquery plugin’s via RequireJS 2+’s shim, then dynamically load JS for certain view.
So instead of combining everything as 1 big JS file, can I…
- selectively combine something as 1 big JS
- something else as another big JS (for another complex view), and
- left something else uncombined (for certiain widget) (maybe compressed only)?
Is this possible? p.s. When shall I consider using Almond?
Thank you.
If you use a build file when optimising your project then you can specify exactly what modules need to be processed.
The
modulessection of the build file will be the best place to start.