Download wp-calypso/packages/calypso-jest/src/module-resolver.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 491 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/packages/calypso-jest/src/module-resolver.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/packages/calypso-jest/src/module-resolver.js
-
curl -L -o module-resolver.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/packages/calypso-jest/src/module-resolver.js
491 Bytes
| module.exports = function ( request, options ) { | |
| let conditions = options.conditions && [ 'calypso:src', ...options.conditions ]; | |
| // The `parsel-js` package has a `browser` condition in `exports` field that points to an ESM module, | |
| // but the condition is matched also when requiring a CJS module. | |
| if ( request === 'parsel-js' && conditions ) { | |
| conditions = conditions.filter( ( c ) => c !== 'browser' ); | |
| } | |
| return options.defaultResolver( request, { ...options, conditions } ); | |
| }; | |