You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
define(function test(require) {
var alertModal = require('widget/confirmView')// here the comment
})
But this code can not load the alertModel module properly
I found that the code commentRegExp = var commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg;
will convert the above code to:
define(function test(require) {
var alertModal = require('widget/confirmView'
})
it will remove a char before the comment //, except :
and requirejs throw "Module name has not been loaded yet for context" error