import CJS_COMPAT_NODE_URL_rqth4iav4b from 'node:url';
import CJS_COMPAT_NODE_PATH_rqth4iav4b from 'node:path';
import CJS_COMPAT_NODE_MODULE_rqth4iav4b from "node:module";

var __filename = CJS_COMPAT_NODE_URL_rqth4iav4b.fileURLToPath(import.meta.url);
var __dirname = CJS_COMPAT_NODE_PATH_rqth4iav4b.dirname(__filename);
var require = CJS_COMPAT_NODE_MODULE_rqth4iav4b.createRequire(import.meta.url);

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