Rocky_Mountain_Vending/.pnpm-store/v10/files/4d/575a6325eb09c54923b4ef99216b375ff18e17afc70915a53377fd36ccb0ca712802b08689319f58fef5efb58080baef504a659b1ed4ec3610627016a39313
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

1 line
No EOL
5 KiB
Text

{"version":3,"sources":["../../../../../src/build/webpack/plugins/wellknown-errors-plugin/getModuleTrace.ts"],"sourcesContent":["import type { webpack } from 'next/dist/compiled/webpack/webpack'\nimport loaderUtils from 'next/dist/compiled/loader-utils3'\nimport { relative } from 'path'\n\nfunction formatModule(compiler: webpack.Compiler, module: any) {\n const relativePath = relative(compiler.context, module.resource).replace(\n /\\?.+$/,\n ''\n )\n return loaderUtils.isUrlRequest(relativePath)\n ? loaderUtils.urlToRequest(relativePath)\n : relativePath\n}\n\nexport function formatModuleTrace(\n compiler: webpack.Compiler,\n moduleTrace: any[]\n) {\n let importTrace: string[] = []\n let firstExternalModule: any\n for (let i = moduleTrace.length - 1; i >= 0; i--) {\n const mod = moduleTrace[i]\n if (!mod.resource) continue\n\n if (!mod.resource.includes('node_modules/')) {\n importTrace.unshift(formatModule(compiler, mod))\n } else {\n firstExternalModule = mod\n break\n }\n }\n\n let invalidImportMessage = ''\n if (firstExternalModule) {\n const firstExternalPackageName =\n firstExternalModule.resourceResolveData?.descriptionFileData?.name\n\n if (firstExternalPackageName === 'styled-jsx') {\n invalidImportMessage += `\\n\\nThe error was caused by using 'styled-jsx' in '${importTrace[0]}'. It only works in a Client Component but none of its parents are marked with \"use client\", so they're Server Components by default.`\n } else {\n let formattedExternalFile =\n firstExternalModule.resource.split('node_modules')\n formattedExternalFile =\n formattedExternalFile[formattedExternalFile.length - 1]\n\n invalidImportMessage += `\\n\\nThe error was caused by importing '${formattedExternalFile.slice(\n 1\n )}' in '${importTrace[0]}'.`\n }\n }\n\n return {\n lastInternalFileName: importTrace[0],\n invalidImportMessage,\n formattedModuleTrace: importTrace.map((mod) => ' ' + mod).join('\\n'),\n }\n}\n\nexport function getModuleTrace(\n module: any,\n compilation: webpack.Compilation,\n compiler: webpack.Compiler\n) {\n // Get the module trace:\n // https://cs.github.com/webpack/webpack/blob/9fcaa243573005d6fdece9a3f8d89a0e8b399613/lib/stats/DefaultStatsFactoryPlugin.js#L414\n const visitedModules = new Set()\n const moduleTrace = []\n\n let current = module\n let isPagesDir = false\n while (current) {\n if (visitedModules.has(current)) break\n if (/[\\\\/]pages/.test(current.resource.replace(compiler.context, ''))) {\n isPagesDir = true\n }\n visitedModules.add(current)\n moduleTrace.push(current)\n const origin = compilation.moduleGraph.getIssuer(current)\n if (!origin) break\n current = origin\n }\n\n return {\n moduleTrace,\n isPagesDir,\n }\n}\n"],"names":["loaderUtils","relative","formatModule","compiler","module","relativePath","context","resource","replace","isUrlRequest","urlToRequest","formatModuleTrace","moduleTrace","importTrace","firstExternalModule","i","length","mod","includes","unshift","invalidImportMessage","firstExternalPackageName","resourceResolveData","descriptionFileData","name","formattedExternalFile","split","slice","lastInternalFileName","formattedModuleTrace","map","join","getModuleTrace","compilation","visitedModules","Set","current","isPagesDir","has","test","add","push","origin","moduleGraph","getIssuer"],"mappings":"AACA,OAAOA,iBAAiB,mCAAkC;AAC1D,SAASC,QAAQ,QAAQ,OAAM;AAE/B,SAASC,aAAaC,QAA0B,EAAEC,MAAW;IAC3D,MAAMC,eAAeJ,SAASE,SAASG,OAAO,EAAEF,OAAOG,QAAQ,EAAEC,OAAO,CACtE,SACA;IAEF,OAAOR,YAAYS,YAAY,CAACJ,gBAC5BL,YAAYU,YAAY,CAACL,gBACzBA;AACN;AAEA,OAAO,SAASM,kBACdR,QAA0B,EAC1BS,WAAkB;IAElB,IAAIC,cAAwB,EAAE;IAC9B,IAAIC;IACJ,IAAK,IAAI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