How do I change the order in which Meteor loads Javascript files?
According to the Meteor documentation, files are currently loaded in this order:
- Files in [project_root]/lib are loaded first
- Files are sorted by directory depth. Deeper files are loaded first.
- Files are sorted in alphabetical order.
- main.* files are loaded last.
Not a solution for all scenarios, but I think ideally anything that is dependent on other code would be placed in a Meteor.startup function, to ensure everything is already loaded.