RequireJS dependency not working, but using as require it works

77 Views Asked by At

I have an annoying problem right now and I can't figure it out why it is happening.

define(["some/file"], function(TestA) {
    "use strict";

     console.log(TestA);

     require(["some/file"], function(TestB) {
         console.log(TestB);
     });

});

If I run this, I have, for some reason the TestA is undefined and the TestB is fine. For all other files it works fine, it is just a single file. But it is like all others that I have.

Any thoughts? Why it works using require but not as a dependency?

0

There are 0 best solutions below