Download next.js/packages/next/src/build/webpack/loaders/next-error-browser-binary-loader.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 417 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/packages/next/src/build/webpack/loaders/next-error-browser-binary-loader.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/packages/next/src/build/webpack/loaders/next-error-browser-binary-loader.ts
-
curl -L -o next-error-browser-binary-loader.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/packages/next/src/build/webpack/loaders/next-error-browser-binary-loader.ts
417 Bytes
| import type { webpack } from 'next/dist/compiled/webpack/webpack' | |
| export default function nextErrorBrowserBinaryLoader( | |
| this: webpack.LoaderContext<any> | |
| ) { | |
| const { resourcePath, rootContext } = this | |
| const relativePath = resourcePath.slice(rootContext.length + 1) | |
| throw new Error( | |
| `Node.js binary module ./${relativePath} is not supported in the browser. Please only use the module on server side` | |
| ) | |
| } | |