react-code-dataset
/
next.js
/test
/e2e
/instrumentation-hook
/with-async-node-page
/instrumentation.js
| export async function register() { | |
| if (process.env.NEXT_RUNTIME === 'edge') { | |
| console.log('instrumentation hook on the edge') | |
| } else if (process.env.NEXT_RUNTIME === 'nodejs') { | |
| console.log('instrumentation hook on nodejs') | |
| const { register } = await import('./instrumentation.node') | |
| await register() | |
| } else { | |
| await require('this should fail') | |
| } | |
| } | |