{"library":"babel-plugin-module-name-mapper","type":"library","category":null,"description":"Babel plugin that adds Jest-like moduleNameMapper support to Babel, enabling import path rewriting with special tokens <pkgDir> and <rootDir>. <pkgDir> resolves to the directory of the closest package.json, making it ideal for monorepos. Current stable version is 1.2.0. Release cadence is low; maintained. Key differentiator: supports <pkgDir> for monorepo-friendly path resolution, which is lacking in Jest and Webpack. Alternative to babel-plugin-module-resolver with different token semantics.","language":"javascript","status":"active","version":"1.2.0","tags":["javascript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install babel-plugin-module-name-mapper","imports":["plugins: [['module-name-mapper', { moduleNameMapper: { '^src/(.*)': '<pkgDir>/src/$1' } }]]","moduleNameMapper: { '^src/(.*)': '<pkgDir>/src/$1' }","const plugin = require('babel-plugin-module-name-mapper');"]},{"cmd":"yarn add babel-plugin-module-name-mapper","imports":[]},{"cmd":"pnpm add babel-plugin-module-name-mapper","imports":[]}],"homepage":null,"github":"https://github.com/mgcrea/babel-plugin-module-name-mapper","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/babel-plugin-module-name-mapper","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-module-name-mapper/compatibility"}}