Dojos AMD feature in Widget

Hi everyone, I like to use AMD feature of Dojo to improve the loading time of my application. In Mendix 5, it is now possible. However, when converting from Mx4, I still use the old way to load (dojo.require....) and It is still synchronous loader (I think). So what should be proper way to define a widget on Mendix to have benefits from Dojo's AMD? Does anyone have examples ? Regards,
1 answers

Because of backwards compatibility with existing widgets, the loader is in legacy synchronous mode by default. This means that it is currently not possible to benefit from the asynchronous loader in Mendix 5. Of course you can use the new syntax by using

require([ "dependencyA", "dependencyB" ], function(a, b) {
    // dependencies loaded and available

See the Dojo AMD API documentation for more information.