In what file do you propose adding the above code? The main widget.js? If so, I am using WabVersion 2.20, and I don't see any 'require'. I do have 'define(['<path to libs>'], function(<lib_name>) {<code goes here>});' in my widget.js file? Is there another file I would add that to? I already have it in my main init.js file as mentioned, but that does not seem to guarantee it gets loaded in the proper order:
From init.js:
resources = resources.concat([
window.apiUrl + 'dojo/resources/dojo.css',
window.apiUrl + 'dijit/themes/claro/claro.css',
window.apiUrl + 'esri/css/esri.css',
window.path + 'jimu.js/css/jimu-theme.css',
window.path + 'libs/moment/moment.min.js',
window.path + 'libs/moment/twix.js',
window.path + 'libs/moment/moment-timezone-with-data.min.js',
])