You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure if this is already handled or not, but we had many cases where modules that were used in a file were not required in that file. We knew they were already required by the main app, so we just left them out. It would be nice if this conversion tool could fix such cases.
Yes - if that is already working, then great. I guess I should have studied the examples a bit closer.
Is the logic such that it will find any references to global objects in the file (A.D.bar) and then see if it can find a corresponding file? In this case, it would look for "A/D/bar", and if it couldn't find such a file, then it would look for "A/D", and finally "A"?
I'm not sure if this is already handled or not, but we had many cases where modules that were used in a file were not required in that file. We knew they were already required by the main app, so we just left them out. It would be nice if this conversion tool could fix such cases.
Take the following example:
dojo.provide("A.B");
dojo.require("A.C");
dojo.declare("A.B", A.C, {
foo: function() {
return A.D.bar();
}
});
So the question now is will A.D be converted properly? In our AMD conversion tool, we had a configuration file that included 3 columns:
This allowed the conversion tool to output the following:
require(["dojo/_base/declare","A/C","A/D"], function(declare,C,D) {
return declare(C, {
foo: function() {
return D.bar();
}
}
});
The text was updated successfully, but these errors were encountered: