gulp-angular-filesort equivalent in webpack
<p>I have exactly the same scenario described in this question: <a href="https://stackoverflow.com/questions/29421409/how-to-load-all-files-in-a-subdirectories-using-webpack-without-require-statemen">How to load all files in a subdirectories using webpack without require statements</a></p>

<p>I'm upgrading a large project written in angular 1, which is basically a bunch of JS files across many directories, sorted by <a href="https://github.com/klei/gulp-angular-filesort" rel="nofollow noreferrer">gulp-angular-filesort</a>. </p>

<p>In order to force modules to load, I must do something like this in </p>

<pre><code>common : glob.sync(['./commonApp.js', './modules/importantModule1App.js', './otherFilesDependingonModules/**/*.js']),
</code></pre>

<p>Which is obviously a bad approach. Otherwise I get a lot of $injector errors:</p>

<pre><code> [$injector:nomod] Module 'common.importantModule1'
</code></pre>

<p>What is the approach/alternative to the old filesort way, simply to keep the app working while slowly upgrading it?</p>