 <p>You want a dynamic list of files(.txt,.tpl,.htm,.json), to avoid a change in JS source code to add more files. </p> <p>I don't know if is there a way to do that, but you must take care about the time that will take to download all this files. I suggest you to create a json file with all files that you want to download, and iterate through this array of files using ajax to get them. </p> <p>If you are try to get all module inside a directory, you need to create a js file: <code>&lt;package-all&gt;.js</code> that encapsulate an <code>require([all files],function());</code> for example.</p> <p>I believe that this is the only way to solve this.</p>