Closure Library's new goog.js file has the following:
export const module = Object.seal({
get: goog.module.get,
// TODO(johnplaisted): Delete this once people have migrated to
// declareModuleId.
declareNamespace: goog.module.declareNamespace,
});
In compiled output this won't get removed, even when it isn't referenced (and RewriteGoogJsImports should ensure it isn't referenced after it runs...).
var b = this;
Object.seal({get:function() {
return null;
}, b:function(c) {
var a = b.$jscomp;
if (!a || "function" != typeof a.a) {
throw Error('Module with namespace "' + c + '" has been loaded incorrectly.');
}
a.c(a.a());
}});
Closure Library's new goog.js file has the following:
In compiled output this won't get removed, even when it isn't referenced (and
RewriteGoogJsImports
should ensure it isn't referenced after it runs...).