message: feat(browser-runtime): fix require with webpack
diff: +/* eslint-disable @typescript-eslint/camelcase */
  import {
  ElectronInterpreterEnvironment
  } from './electron-interpreter-environment';
  @@ -11,15 +12,33 @@ import {
  import { ServiceProvider } from '@mongosh/service-provider-core';
  +declare const __webpack_require__: any;
  +declare const __non_webpack_require__: any;
  +
  export class ElectronRuntime implements Runtime {
  private openContextRuntime: OpenContextRuntime;
  constructor(serviceProvider: ServiceProvider, messageBus?: {
  emit: (eventName: string, ...args: any[]) => void;
  }) {
  + // NOTE:
  + //
  + // This is necessary for client code bundling this library with
  + // webpack.
  + //
  + // Webpack will replace require with its own implementation, and that would
  + // not necessarily have access to the node modules available in node
  + // (depends on the target configuration).
  + //
  + // IMPORTANT: as it cannot be easily tested be aware of this bug before
  + // changing this line: https://github.com/webpack/webpack/issues/5939 (it
  + // seems that checking for `typeof __non_webpack_require__` does not work).
  + //
  + const requireFunc = typeof __webpack_require__ === 'function' ? __non_webpack_require__ : require;
  +
  this.openContextRuntime = new OpenContextRuntime(
  serviceProvider,
  - new ElectronInterpreterEnvironment({ require }),
  + new ElectronInterpreterEnvironment({ require: requireFunc }),
  messageBus
  );
  }
  