I have a custom widget located in foo/bar.js declared like this:
define([
...
], function(
...
) {
return {
...
}
);
I am trying to use it inside other widget like this:
require([
"foo/bar"
...
], function(bar, ..
..
But it would not get loaded. Does anyone have any suggestions?
When I type foo/bar in the console, it returns empty object Object {}. All worked fine when I was using old format and dojo.provide(). But once it was dropped the wiget became unvisible.
Important: the problem only occurs when I am trying to use Google-hosted Dojo:
<!--
<script src="{{ STATIC_URL }}js/dojo/dojo.js" type="text/javascript"></script>
!-->
<script src="//ajax.googleapis.com/ajax/libs/dojo/1.8.6/dojo/dojo.js"></script>
I have to use Google-hosted Dojo for debugging purpose, since STATIC_URL one takes 30-40 seconds to load (because it is uncompiled).