-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resolving against an arbitrary directory #2163
Comments
I'm not sure if I follow, but isn't the |
It would be enough if it was possible change resolution during development so that it would resolve against source over package.json |
This will be solved through #2925, closing as duplicate. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Do you want to request a feature or report a bug?
feature
What is the current behavior?
Jest resolves against package
main
. There's abrowser
boolean
that allows changing the resolution mechanism against thebrowser
field, but I don't want to set that.What is the expected behavior?
I believe it would be useful to have a more generic resolution mechanism included. Designed right, you could eliminate the current
browser
field with something more powerful. I would go with a field like this:resolveTo: <array>
- Defaults to["main"]
. If set to["src/", "main"]
(clearly a path since there's a slash) it would try to resolve againstsrc/
within package directory before usingmain
as a fallback. This deprecatesbrowser: <boolean>
.The text was updated successfully, but these errors were encountered: