{"id":19342197,"url":"https://github.com/bolasblack/module-mapper-webpack-plugin","last_synced_at":"2025-07-23T15:36:22.099Z","repository":{"id":37027206,"uuid":"201777437","full_name":"bolasblack/module-mapper-webpack-plugin","owner":"bolasblack","description":"A webpack plugin to replace module path","archived":false,"fork":false,"pushed_at":"2025-07-22T03:42:37.000Z","size":160,"stargazers_count":0,"open_issues_count":10,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-22T06:35:26.303Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bolasblack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-08-11T14:47:32.000Z","updated_at":"2023-05-13T22:06:41.000Z","dependencies_parsed_at":"2024-02-27T13:41:53.305Z","dependency_job_id":"f96dbefa-ed4f-491b-822d-83dd4a267524","html_url":"https://github.com/bolasblack/module-mapper-webpack-plugin","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/bolasblack/module-mapper-webpack-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bolasblack%2Fmodule-mapper-webpack-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bolasblack%2Fmodule-mapper-webpack-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bolasblack%2Fmodule-mapper-webpack-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bolasblack%2Fmodule-mapper-webpack-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bolasblack","download_url":"https://codeload.github.com/bolasblack/module-mapper-webpack-plugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bolasblack%2Fmodule-mapper-webpack-plugin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266705653,"owners_count":23971715,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T03:34:00.231Z","updated_at":"2025-07-23T15:36:22.024Z","avatar_url":"https://github.com/bolasblack.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# module-mapper-webpack-plugin [![Build Status](https://travis-ci.com/bolasblack/module-mapper-webpack-plugin.svg?branch=master)](https://travis-ci.com/bolasblack/module-mapper-webpack-plugin) [![Coverage Status](https://coveralls.io/repos/github/bolasblack/module-mapper-webpack-plugin/badge.svg?branch=master)](https://coveralls.io/github/bolasblack/module-mapper-webpack-plugin?branch=master)\n\n## Usage\n\n```bash\nyarn add module-mapper-webpack-plugin -D\n```\n\n```js\n// webpack.config.ts\n\nimport { ModuleReplaceWebpackPlugin, replacePath } from 'module-mapper-webpack-plugin'\n\nexport default {\n  // ...\n  plugins: [\n    new ModuleReplaceWebpackPlugin({\n      async replacer(requestInfo) {\n        // modify requestInfo object directly\n        requestInfo.request = 'absolute path or path relative to issuer'\n\n        // or return a new partial requestInfo\n        return {\n          request: 'absolute path or path relative to issuer',\n        }\n\n        // for example:\n        if (\n          !/\\/file\\.overlay\\b/.test(requestInfo.contextInfo.issuer) \u0026\u0026\n          /\\/file\\b/.test(requestInfo.request)\n        ) {\n          return {\n            request: replacePath(\n              reqPath =\u003e\n                path.resolve(\n                  path.resolve(requestInfo.context, reqPath),\n                  '../file.overlay.js',\n                ),\n              d.request,\n            ),\n          }\n        }\n        return requestInfo\n      },\n    } as ModuleReplaceWebpackPlugin.ConstructOptions)\n  ],\n}\n```\n\n## Development\n\n```bash\nyarn build # build code\nyarn watch # build and watch code\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbolasblack%2Fmodule-mapper-webpack-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbolasblack%2Fmodule-mapper-webpack-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbolasblack%2Fmodule-mapper-webpack-plugin/lists"}