{"version":3,"sources":["../../../../../src/build/webpack/loaders/next-invalid-import-error-loader.ts"],"sourcesContent":["import type webpack from 'webpack'\n\nexport type InvalidImportLoaderOpts = { message: string }\n\nconst nextInvalidImportErrorLoader: webpack.LoaderDefinitionFunction<InvalidImportLoaderOpts> =\n  function () {\n    const { message } = this.getOptions()\n    const error = new Error(message)\n    if (process.env.NEXT_RSPACK) {\n      // Rspack uses miette for error formatting, which automatically includes stack\n      // traces in the error message. To avoid showing redundant stack information\n      // in the final error output, we clear the stack property.\n      error.stack = undefined\n    }\n    throw error\n  }\n\nexport default nextInvalidImportErrorLoader\n"],"names":["nextInvalidImportErrorLoader","message","getOptions","error","Error","process","env","NEXT_RSPACK","stack","undefined"],"mappings":"AAIA,MAAMA,+BACJ;IACE,MAAM,EAAEC,OAAO,EAAE,GAAG,IAAI,CAACC,UAAU;IACnC,MAAMC,QAAQ,qBAAkB,CAAlB,IAAIC,MAAMH,UAAV,qBAAA;eAAA;oBAAA;sBAAA;IAAiB;IAC/B,IAAII,QAAQC,GAAG,CAACC,WAAW,EAAE;QAC3B,8EAA8E;QAC9E,4EAA4E;QAC5E,0DAA0D;QAC1DJ,MAAMK,KAAK,GAAGC;IAChB;IACA,MAAMN;AACR;AAEF,eAAeH,6BAA4B","ignoreList":[0]}