I have a site where the navigation is required on all pages apart from the home page - rather than create .js files for each page individually, I was wondering if it would be possible to use common.js but exclude it from being loaded on the home page. Is this possible?
The router is just matching against classes in the body for each page. You could wrap your code in common.js with a conditional that checks for home or something and executes code accordingly. That would only affect what code runs, though: all your JS is compiled into a single file (by default) so it all gets downloaded regardless of the page you’re on.