Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
module will not be defined, so the greeting object will not be assigned to the new module namespace. We need to check with the Google Closure compiler mailing list if we can submit a patch that replaces module so that the condition succeeds.
Many popular libraries use the following or a similar idiom:
if (typeof define == "function" && define.amd) { define(function() { return greeting; }); } else if (typeof module != "undefined" && module.exports) { module.exports = greeting; } else { window["greeting"] = greeting; }
The ProcessCommonJSModules class converts this to the following:
if (typeof define == "function" && define.amd) { define(function() { return greeting; }); } else { if (typeof module != "undefined" && module$greeting) { module$greeting = greeting; } else { window["greeting"] = greeting; } }
module
will not be defined, so thegreeting
object will not be assigned to the new module namespace. We need to check with the Google Closure compiler mailing list if we can submit a patch that replacesmodule
so that the condition succeeds.