mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
This allows injecting client bootstrap code using only next.config.js (without writing to any user source files).
9 lines
413 B
TypeScript
9 lines
413 B
TypeScript
;(window as any).__INJECT_ORDER = (window as any).__INJECT_ORDER || []
|
|
;(window as any).__INJECT_ORDER.push('user')
|
|
;(window as any).__INSTRUMENTATION_CLIENT_EXECUTED_AT = performance.now()
|
|
|
|
export function onRouterTransitionStart(href: string, navigateType: string) {
|
|
const pathname = new URL(href, window.location.href).pathname
|
|
console.log(`[Router Transition Start] [${navigateType}] ${pathname} user`)
|
|
}
|