{"id":19560618,"url":"https://github.com/zoubin/resolve-shimify","last_synced_at":"2026-06-07T20:31:04.412Z","repository":{"id":34862202,"uuid":"38862189","full_name":"zoubin/resolve-shimify","owner":"zoubin","description":"custom resolve for browserify","archived":false,"fork":false,"pushed_at":"2015-07-10T07:51:07.000Z","size":132,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-14T05:39:40.876Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/zoubin.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}},"created_at":"2015-07-10T05:11:23.000Z","updated_at":"2015-07-10T06:26:45.000Z","dependencies_parsed_at":"2022-09-15T07:21:52.491Z","dependency_job_id":null,"html_url":"https://github.com/zoubin/resolve-shimify","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoubin%2Fresolve-shimify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoubin%2Fresolve-shimify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoubin%2Fresolve-shimify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zoubin%2Fresolve-shimify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zoubin","download_url":"https://codeload.github.com/zoubin/resolve-shimify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240576534,"owners_count":19823291,"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","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-11T05:08:17.225Z","updated_at":"2026-06-07T20:31:04.344Z","avatar_url":"https://github.com/zoubin.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# resolve-shimify\nCustom resolve for [browserify](http://npmjs.org/package/browserify).\n\nHere are two typical cases where this plugin comes in handy:\n\n1. Make `require('react')` equal to `require('react/dist/react.js')`, even for react components installed in `node_modules`, most of them not specifying a [browser-filed](https://github.com/substack/browserify-handbook#browser-field) in `package.json`\n2. Make symlinks resolved to their real paths, so that they can be treated as local packages and [transforms](https://github.com/substack/browserify-handbook#browserifytransform-field) from `package.json` may be applicable. You can use [realpathify](http://npmjs.org/package/realpathify).\n\nThis plugin hacks a private property of the browserify instance (`b._bresolve`).\nIt does not transform file contents, but makes twists to the behaviour of resolving the module paths.\nSo it is much more faster than applying a global transform.\n\n## Usage\n\n```javascript\nvar browserify = require('browserify');\nvar shimify = require('resolve-shimify');\n\nbrowserify(opts)\n.plugin(shimify, { react: 'react/dist/react.js' })\n;\n```\n\n## b.plugin(shimify, shimFn)\n\n### shimFn(module)\n\nType: `Function`\n\nReturn: `String`, `undefined`\n\nThis function is called before resolving, to transform `module` to some other value to resolve.\n\nIf the returned value is `falsy`, the original `module` value will be used.\n\n\n## b.plugin(shimify, shims)\n\n### shims\n\nType: `Object`\n\nA map for transforming `module`.\n\nEach key must be either an absolute path or a module path.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzoubin%2Fresolve-shimify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzoubin%2Fresolve-shimify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzoubin%2Fresolve-shimify/lists"}