Closed commuterjoy closed 11 years ago
I'd be happy to remove the name
from the define in Bonzo but I'll have to bug @ded to get it sorted out in Reqwest and Qwery. Thanks for raising this issue.
@rvagg great, that would be very helpful.
hey @commuterjoy (and @rvagg )
according to amd's define
method, it looks like this:
define(['someModule'] , function (myMod) {
return function () {};
});
it even says so on the RequireJS website on why amd
so what i don't get is, how this works with bean (which is doing it wrong), and not bonzo, qwery, and reqwest.
ok, really trying to get this right.
have a look at this too: http://requirejs.org/docs/api.html#defdep
from what it looks like, the define method can have a first arg which is an array of dependencies. and in that case, bonzo has no dependencies...... which means we can switch it out to look like bean.
alright folks. this has been fixed and i verified it to be working https://github.com/ded/bonzo/commit/d757fe64026b93bfde2a55c5f4f6ed8bf456ca99#L0R8
i added require.js
in the integration folder to verify that it does in fact work :+1:
cheers
Hi,
Bonzo (and Reqwest + Qwery) all produce an empty named AMD module when used with r.js
They all produces this after compilation, alongside the original module :-
Test case, https://github.com/guardian/requirejs-optimiser-bug
requirejs (client-side) conveniently ignores this, but curl and almond throw exceptions due to duplicate module names.
So, I think r.js is misinterpreting this line for some reason,
Various other modules (Eg, bean etc.) don't have this problem.
I'm using the latest r.js package,
Thanks, M