function polyfillGoogRequire()

in polymer/lib/utils/require_shim.js [16:36]


function polyfillGoogRequire() {
  // For code that doesn't compile or use the goog debug loader, we need to stub
  // out goog.require

  if (!window.goog) {
    window.goog = {
      require(id) {
        if (id === 'webcomponentsjs.custom_elements.auto_es5_shim') {
          // we're in a (deprecated) uncompiled configuration, that file is
          // unnecessary
          return;
        }
        throw new Error(
            `Called goog.require without loading //javascript/closure:base`);
      }
    };
    // For uncompiled tests that want to only do a goog.require if it's a
    // real implementation of goog.require.
    window.goog.require['isDevModeNoOpImpl'] = true;
  }
}