I've been looking for a way to split my one page app's js file in more than one. Like this:
plugins.js
open.js
closed.js
admin.js
So, when the user loads the first page, plugins.js and open.js is loaded. The other are loaded only when in specific pages (like a closed section or an admin section, which is closed so I'd load it after the other ones). Today all my app users load the whole heavy and minified javascript file.
Am I able to do that using require.js? I couldn't find any reference to this kind of approach.
Thanks.