Rocky_Mountain_Vending/.pnpm-store/v10/files/50/b5940a503cc07d0021ef0ebd06237495186d0db8e098fa62dc777c1d6ee46a8f5ce98af8d8dd3c58c619a0f48e2c2e5af9b724d6a51ee20bd87ed09da07d90
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 KiB
Text

import Router from '../router';
import { sendMessage } from './hot-reloader/pages/websocket';
export default (async ()=>{
// Never send pings when using Turbopack as it's not used.
// Pings were originally used to keep track of active routes in on-demand-entries with webpack.
if (process.env.TURBOPACK) {
return;
}
Router.ready(()=>{
setInterval(()=>{
// when notFound: true is returned we should use the notFoundPage
// as the Router.pathname will point to the 404 page but we want
// to ping the source page that returned notFound: true instead
const notFoundSrcPage = self.__NEXT_DATA__.notFoundSrcPage;
const pathname = (Router.pathname === '/404' || Router.pathname === '/_error') && notFoundSrcPage ? notFoundSrcPage : Router.pathname;
sendMessage(JSON.stringify({
event: 'ping',
page: pathname
}));
}, 2500);
});
});
//# sourceMappingURL=on-demand-entries-client.js.map