Closed mightyiam closed 5 years ago
👍 Pull request welcome :)
Note: This issue has a bounty, so it's expected that you are an experienced programmer and that you give it your best effort if you intend to tackle this. Don't forget, if applicable, to add tests, docs (double-check for typos), and update TypeScript definitions. And don't be sloppy. Review your own diff multiple times and try to find ways to improve and simplify your code. Instead of asking too many questions, present solutions. The point of an issue bounty is to reduce my workload, not give me more. Include a 🦄 in your PR description to indicate that you've read this. Thanks for helping out 🙌 - @sindresorhus
Does anyone have a pointer for me?
I think you could use Module._load
(what require()
uses) with a custom module entry to be able to set the parent. Another possible solution could be to modify require.cache
.
@issuehunt has funded $80.00 to this issue.
@sindresorhus has rewarded $72.00 to @stroncium. See it on IssueHunt
module.parent
in module required byrequireUncached
will be the[...]/require-uncached/index.js
module.Can we please fix it to be the parent of that? Meaning, the
module.parent.parent
? I think it makes sense.IssueHunt Summary
#### [ stroncium](https://issuehunt.io/u/stroncium) has been rewarded. ### Backers (Total: $80.00) - [ issuehunt](https://issuehunt.io/u/issuehunt) ($80.00) ### Submitted pull Requests - [#13 Make parent transparent](https://issuehunt.io/r/sindresorhus/import-fresh/pull/13) --- ### Tips - Checkout the [Issuehunt explorer](https://issuehunt.io/r/sindresorhus/import-fresh/) to discover more funded issues. - Need some help from other developers? [Add your repositories](https://issuehunt.io/r/new) on IssueHunt to raise funds. --- IssueHunt has been backed by the following sponsors. [Become a sponsor](https://issuehunt.io/membership/members)