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>
1 line
No EOL
4 KiB
Text
1 line
No EOL
4 KiB
Text
{"version":3,"sources":["../../../../src/build/webpack/loaders/next-flight-client-entry-loader.ts"],"sourcesContent":["import type { webpack } from 'next/dist/compiled/webpack/webpack'\nimport {\n BARREL_OPTIMIZATION_PREFIX,\n RSC_MODULE_TYPES,\n} from '../../../shared/lib/constants'\nimport { getModuleBuildInfo } from './get-module-build-info'\nimport { regexCSS } from './utils'\n\n/**\n * { [client import path]: [exported names] }\n */\nexport type ClientComponentImports = Record<string, Set<string>>\nexport type CssImports = Record<string, string[]>\n\nexport type NextFlightClientEntryLoaderOptions = {\n modules: string[] | string\n /** This is transmitted as a string to `getOptions` */\n server: boolean | 'true' | 'false'\n}\n\nexport type FlightClientEntryModuleItem = {\n // module path\n request: string\n // imported identifiers\n ids: string[]\n}\n\nexport default function transformSource(\n this: webpack.LoaderContext<NextFlightClientEntryLoaderOptions>\n) {\n let { modules, server } = this.getOptions()\n const isServer = server === 'true'\n\n if (!Array.isArray(modules)) {\n modules = modules ? [modules] : []\n }\n\n const code = modules\n .map((x) => JSON.parse(x) as FlightClientEntryModuleItem)\n // Filter out CSS files in the SSR compilation\n .filter(({ request }) => (isServer ? !regexCSS.test(request) : true))\n .map(({ request, ids }: FlightClientEntryModuleItem) => {\n const importPath = JSON.stringify(\n request.startsWith(BARREL_OPTIMIZATION_PREFIX)\n ? request.replace(':', '!=!')\n : request\n )\n\n // When we cannot determine the export names, we use eager mode to include the whole module.\n // Otherwise, we use eager mode with webpackExports to only include the necessary exports.\n // If we have '*' in the ids, we include all the imports\n if (ids.length === 0 || ids.includes('*')) {\n return `import(/* webpackMode: \"eager\" */ ${importPath});\\n`\n } else {\n return `import(/* webpackMode: \"eager\", webpackExports: ${JSON.stringify(\n ids\n )} */ ${importPath});\\n`\n }\n })\n .join(';\\n')\n\n const buildInfo = getModuleBuildInfo(this._module!)\n\n buildInfo.rsc = {\n type: RSC_MODULE_TYPES.client,\n }\n if (process.env.BUILTIN_FLIGHT_CLIENT_ENTRY_PLUGIN) {\n const rscModuleInformationJson = JSON.stringify(buildInfo.rsc)\n return (\n `/* __rspack_internal_rsc_module_information_do_not_use__ ${rscModuleInformationJson} */\\n` +\n code\n )\n }\n\n return code\n}\n"],"names":["BARREL_OPTIMIZATION_PREFIX","RSC_MODULE_TYPES","getModuleBuildInfo","regexCSS","transformSource","modules","server","getOptions","isServer","Array","isArray","code","map","x","JSON","parse","filter","request","test","ids","importPath","stringify","startsWith","replace","length","includes","join","buildInfo","_module","rsc","type","client","process","env","BUILTIN_FLIGHT_CLIENT_ENTRY_PLUGIN","rscModuleInformationJson"],"mappings":"AACA,SACEA,0BAA0B,EAC1BC,gBAAgB,QACX,gCAA+B;AACtC,SAASC,kBAAkB,QAAQ,0BAAyB;AAC5D,SAASC,QAAQ,QAAQ,UAAS;AAqBlC,eAAe,SAASC;IAGtB,IAAI,EAAEC,OAAO,EAAEC,MAAM,EAAE,GAAG,IAAI,CAACC,UAAU;IACzC,MAAMC,WAAWF,WAAW;IAE5B,IAAI,CAACG,MAAMC,OAAO,CAACL,UAAU;QAC3BA,UAAUA,UAAU;YAACA;SAAQ,GAAG,EAAE;IACpC;IAEA,MAAMM,OAAON,QACVO,GAAG,CAAC,CAACC,IAAMC,KAAKC,KAAK,CAACF,GACvB,8CAA8C;KAC7CG,MAAM,CAAC,CAAC,EAAEC,OAAO,EAAE,GAAMT,WAAW,CAACL,SAASe,IAAI,CAACD,WAAW,MAC9DL,GAAG,CAAC,CAAC,EAAEK,OAAO,EAAEE,GAAG,EAA+B;QACjD,MAAMC,aAAaN,KAAKO,SAAS,CAC/BJ,QAAQK,UAAU,CAACtB,8BACfiB,QAAQM,OAAO,CAAC,KAAK,SACrBN;QAGN,4FAA4F;QAC5F,0FAA0F;QAC1F,wDAAwD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