import CJS_COMPAT_NODE_URL_cmcw3allykd from 'node:url';
import CJS_COMPAT_NODE_PATH_cmcw3allykd from 'node:path';
import CJS_COMPAT_NODE_MODULE_cmcw3allykd from "node:module";

var __filename = CJS_COMPAT_NODE_URL_cmcw3allykd.fileURLToPath(import.meta.url);
var __dirname = CJS_COMPAT_NODE_PATH_cmcw3allykd.dirname(__filename);
var require = CJS_COMPAT_NODE_MODULE_cmcw3allykd.createRequire(import.meta.url);

// ------------------------------------------------------------
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
// ------------------------------------------------------------
import {
  getAutomockCode
} from "../../../../_node-chunks/chunk-T226NVZZ.js";
import {
  babelParser
} from "../../../../_node-chunks/chunk-UMSPL6EK.js";
import "../../../../_node-chunks/chunk-AE2MIKRC.js";
import {
  __name
} from "../../../../_node-chunks/chunk-7TXMEKLA.js";

// src/core-server/presets/webpack/loaders/webpack-automock-loader.ts
function webpackAutomockLoader(source) {
  const options = this.getOptions();
  const isSpy = options.spy === "true";
  const mocked = getAutomockCode(source, isSpy, babelParser);
  return mocked.toString();
}
__name(webpackAutomockLoader, "webpackAutomockLoader");
export {
  webpackAutomockLoader as default
};
