The basic idea is to pass the required modules for any given page via a body tag attribute. The modules can return public properties which can be accessed from main.js and key/value arguments can be passed to the modules via the attribute tag. This approach has given me a lot of flexibility in modular design and code sharing throughout multi page applications.
Example body attribute specifying two modules to load, one with key/value arguments
<body data-route="sidebar social?type:twitter,something:somethingelse">
What do you guys think? :)