import CJS_COMPAT_NODE_URL_jj04cksboja from 'node:url';
import CJS_COMPAT_NODE_PATH_jj04cksboja from 'node:path';
import CJS_COMPAT_NODE_MODULE_jj04cksboja from "node:module";

var __filename = CJS_COMPAT_NODE_URL_jj04cksboja.fileURLToPath(import.meta.url);
var __dirname = CJS_COMPAT_NODE_PATH_jj04cksboja.dirname(__filename);
var require = CJS_COMPAT_NODE_MODULE_jj04cksboja.createRequire(import.meta.url);

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