Rocky_Mountain_Vending/.pnpm-store/v10/files/f9/4dc31c49c9d6994f20836828f19fc8a24d6f1833180c4fb809c4bb800dfe3e751a13225631bc3168927252c675c9ec58d649ed11b7c1c3d68dde08655243d8
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

24 lines
No EOL
1.1 KiB
Text

/**
* We extend Math.random() during builds and revalidates to ensure that prerenders don't observe randomness
* When cacheComponents is enabled. randomness is a form of IO even though it resolves synchronously. When cacheComponents is
* enabled we need to ensure that randomness is excluded from prerenders.
*
* The extensions here never error nor alter the random generation itself and thus should be transparent to callers.
*/ import { io } from './utils';
const expression = '`Math.random()`';
try {
const _random = Math.random;
Math.random = (function random() {
io(expression, 'random');
return _random.apply(null, arguments);
// We bind here to alter the `toString` printing to match `Math.random`'s native `toString`.
// eslint-disable-next-line no-extra-bind
}).bind(null);
Object.defineProperty(Math.random, 'name', {
value: 'random'
});
} catch {
console.error(`Failed to install ${expression} extension. When using \`cacheComponents\` calling this function will not correctly trigger dynamic behavior.`);
}
//# sourceMappingURL=random.js.map