{"library":"babel-plugin-require-context-hook","type":"library","category":null,"description":"A Babel plugin that replicates Webpack's require.context() for use in Node.js environments, primarily with Mocha tests or scripts. Current stable version 1.0.0. It rewrites require.context calls into a global function provided by a helper register script. Unlike alternatives (e.g., mock-require-context), this plugin uses a Babel transform to inject __dirname into the context, making it work seamlessly with babel-register. It has no runtime dependencies.","language":"javascript","status":"active","version":"1.0.0","tags":["javascript","babel","webpack"],"last_verified":"Wed May 27","install":[{"cmd":"npm install babel-plugin-require-context-hook","imports":["require('babel-plugin-require-context-hook/register')();","// in .babelrc: \"plugins\": [\"require-context-hook\"]","const modules = require.context('./components', true, /\\.js$/);"]},{"cmd":"yarn add babel-plugin-require-context-hook","imports":[]},{"cmd":"pnpm add babel-plugin-require-context-hook","imports":[]}],"homepage":null,"github":"https://github.com/smrq/babel-plugin-require-context-hook","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/babel-plugin-require-context-hook","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/babel-plugin-require-context-hook/compatibility"}}