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
KnockoutJS has (I think) an unusual way to register its self under AMD... its code looks like this (ref here):
// Support three module loading scenariosif(typeofrequire==='function'&&typeofexports==='object'&&typeofmodule==='object'){// [1] CommonJS/Node.jsvartarget=module['exports']||exports;// module.exports is for Node.jsfactory(target,require);}elseif(typeofdefine==='function'&&define['amd']){// [2] AMD anonymous moduledefine(['exports','require'],factory);}else{// [3] No module loader (plain <script> tag) - put directly in global namespacefactory(window['ko']={});}
amdclean converts this to:
// Support three module loading scenariosif(typeofrequire==='function'&&typeofexports==='object'&&typeofmodule==='object'){// [1] CommonJS/Node.jsvartarget=module['exports']||exports;// module.exports is for Node.jsfactory(target,require);}elseif(true){knockout=function(exports,require){returntypeoffactory==='function' ? factory(exports,require) : factory;}({},{});}else{// [3] No module loader (plain <script> tag) - put directly in global namespacefactory(window['ko']={});}
This however, does not register the module because the knockoutjs factory does not return anything - it simply adds its methods to the exports provided on input
Anyway I can fix this during the build process? or get around it?
Thanks in advance.
/Paul.
The text was updated successfully, but these errors were encountered:
KnockoutJS has (I think) an unusual way to register its self under AMD... its code looks like this (ref here):
amdclean converts this to:
This however, does not register the module because the knockoutjs factory does not return anything - it simply adds its methods to the
exports
provided on inputAnyway I can fix this during the build process? or get around it?
Thanks in advance.
/Paul.
The text was updated successfully, but these errors were encountered: