Using require.js with widgets