Closed Ashot-KR closed 4 years ago
I'm having the same problem. The relatively nasty workaround I used was to create a file called "momentglobal" like the following: define([ 'moment', ], function(Moment) { moment = Moment; // Purposefully global });
I was using this with the requirejs shim for a while, but it turns out that didn't work with the r.js optimizer. So, the even more gangster solution was merely to include momentglobal in any relevant scripts immediately before rome.
It always throws moment.js dependancy exception. Moment.js does not provide
moment
variable in global scope any more — i believe it`s a reason.http://jsbin.com/gusukudari/edit?html,js,output