jrburke/requirejs — Issue #198: Can load a file multiple times if one call omits the .js suffix
Author: jeremyckahn
Created: 2012-03-02 07:07:10+00:00
State: open

I have three files, foo.js, bar.js, and baz.js. bar.js and baz.js depend on foo.js.

````javascript
//foo.js
define(function () {
// ...
});
````

````javascript
//bar.js
require(['foo'], function () {
// ...
});
````

````javascript
//baz.js
define(['foo.js'], function () {
// ...
});
````

foo.js gets loaded twice. When I drop the trailing `.js` from baz.js's foo requirement, foo is loaded only once (the correct behavior). It seems that library should catch this sort of thing.