Download next.js/packages/next/src/shared/lib/get-webpack-bundler.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 373 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/packages/next/src/shared/lib/get-webpack-bundler.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/packages/next/src/shared/lib/get-webpack-bundler.ts
-
curl -L -o get-webpack-bundler.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/packages/next/src/shared/lib/get-webpack-bundler.ts
373 Bytes
| import { webpack } from 'next/dist/compiled/webpack/webpack' | |
| import { getRspackCore } from './get-rspack' | |
| /** | |
| * Depending on if Rspack is active or not, returns the appropriate set of | |
| * webpack-compatible api. | |
| * | |
| * @returns webpack bundler | |
| */ | |
| export default function getWebpackBundler(): typeof webpack { | |
| return process.env.NEXT_RSPACK ? getRspackCore() : webpack | |
| } | |