Always require certain dependencies in RequireJS

fafattaspData

New Member
I'm working on a \[code\]Backbone\[/code\] project and I'm loading \[code\]jQuery\[/code\], \[code\]Underscore\[/code\] and \[code\]Backbone\[/code\] with RequireJS. I find myself typing this pattern over and over again in all the modules:\[code\]define(['jquery', 'underscore', 'backbone'], function($, _, Backbone) { ...\[/code\]Is there a way or workaround to make these 3 libraries available to all modules without explicitly requiring them so I can concentrate on requiring extra things?I though about loading this dependencies stack within script tags and use RequireJS for my modules and extra dependencies, but I'd lose the \[code\]JamJS\[/code\] compile feature by having to concatenate jquery, underscore and backbone myself.
 
Back
Top