mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
This allows injecting client bootstrap code using only next.config.js (without writing to any user source files).
9 lines
338 B
JavaScript
9 lines
338 B
JavaScript
window.__INJECT_ORDER = window.__INJECT_ORDER || []
|
|
window.__INJECT_ORDER.push('b')
|
|
window.__INJECT_B_EXECUTED_AT = performance.now()
|
|
|
|
export function onRouterTransitionStart(href, navigateType) {
|
|
const pathname = new URL(href, window.location.href).pathname
|
|
console.log(`[Router Transition Start] [${navigateType}] ${pathname} b`)
|
|
}
|