I have exactly the same scenario described in this question: How to load all files in a subdirectories using webpack without require statements
I'm upgrading a large project written in angular 1, which is basically a bunch of JS files across many directories, sorted by gulp-angular-filesort.
In order to force modules to load, I must do something like this in
common : glob.sync(['./commonApp.js', './modules/importantModule1App.js', './otherFilesDependingonModules/**/*.js']),
Which is obviously a bad approach. Otherwise I get a lot of $injector errors:
[$injector:nomod] Module 'common.importantModule1'
What is the approach/alternative to the old filesort way, simply to keep the app working while slowly upgrading it?