Download next.js/test/e2e/instrumentation-hook/with-node-page/instrumentation.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 279 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/e2e/instrumentation-hook/with-node-page/instrumentation.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/test/e2e/instrumentation-hook/with-node-page/instrumentation.js
-
curl -L -o instrumentation.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/e2e/instrumentation-hook/with-node-page/instrumentation.js
279 Bytes
| export 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') | |
| } else { | |
| require('this should fail') | |
| } | |
| } | |