import CJS_COMPAT_NODE_URL_689k3220omr from 'node:url';
import CJS_COMPAT_NODE_PATH_689k3220omr from 'node:path';
import CJS_COMPAT_NODE_MODULE_689k3220omr from "node:module";

var __filename = CJS_COMPAT_NODE_URL_689k3220omr.fileURLToPath(import.meta.url);
var __dirname = CJS_COMPAT_NODE_PATH_689k3220omr.dirname(__filename);
var require = CJS_COMPAT_NODE_MODULE_689k3220omr.createRequire(import.meta.url);

// ------------------------------------------------------------
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
// ------------------------------------------------------------
import {
  getAutomockCode
} from "../../../../_node-chunks/chunk-WQWKVZC3.js";
import {
  babelParser
} from "../../../../_node-chunks/chunk-YTDFMPIY.js";
import "../../../../_node-chunks/chunk-WXZY2JGI.js";
import {
  __name
} from "../../../../_node-chunks/chunk-X2772BGA.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
};
