Rocky_Mountain_Vending/.pnpm-store/v10/files/1b/29f1eedae83e0f9e13809223a8810f88ad4b00e03bc0d60f0c4419514505d86e8dc7c87c90df135aa74c72e19f9c3e1f51889e8979a2530553ee4a5b5201e6
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

26 lines
947 B
Text

/**
* This simulates what something like `tsx` (https://github.com/privatenumber/tsx)
* will do: it will try to resolve a URL with a `.js` extension to a `.ts` extension.
*
* Combined with the test case in the adjacent `multiple-loaders.test.mjs` file,
* this forces `import-in-the-middle` into what used to be a failure state: where
* `context.parentURL` is a `node:*` specifier and the `specifier` refers to a file
* that does not exist.
*
* See https://github.com/nodejs/node/issues/52987 for more details.
*/
export async function resolve (specifier, context, defaultResolve) {
if (!specifier.endsWith('.js') && !specifier.endsWith('.mjs')) {
return await defaultResolve(specifier, context)
}
try {
return await defaultResolve(specifier.replace(/\.m?js/, '.ts'), context)
} catch (err) {
if (err.code !== 'ERR_MODULE_NOT_FOUND') {
throw err
}
return await defaultResolve(specifier, context)
}
}