 <p><code>requirejs</code> has some magic arguments that you can request - among them is <a href="https://github.com/jrburke/requirejs/blob/19a98167858db65342a269ba76f06e3be152210e/require.js#L584-597" rel="nofollow"><code>module</code></a>:</p> <pre><code>define(["module", "other", "dependencies"], function(module, other, deps) { var whereAmI = module.uri; }); </code></pre>