I am using RequireJS, but our project has gotten quite large.
requirejs([
'util/utils',
'util/image_store',
'models/user_model',
'util/analytics'
],function() { /* do start here */ });
I've taken that initial group and I've concatenated together of those files so now I want to do this: requirejs([ 'initial_download.js' ],function() { /* do start here */ });
Now how do I let the other files know, that say use models/user_model that they don't need to download it themselves that requires already did a define?
Like this in a hypothetical UserView.js:
define(['models/user_model'],function(UserModel) {
function UserView() { /* */ }
});