-
Notifications
You must be signed in to change notification settings - Fork 70
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
Feature Request: Resolve Modules #83
Comments
hm, not sure what I think of this. What is the thinking here? You would have the browser specific code of the module in a separate module and want to reference it? |
I think in general most people would expect this to resolve similar to how The specific use case is that I have a bunch of modules that I want to resolve to the identity function (or other times, noop) in the browser, such that when you |
@defunctzombie - any more thoughts on this? |
I think this is a good idea. We first need to add it here (https://github.com/defunctzombie/package-browser-field-spec) to document the desired behavior (and probably start a changelog on that page to notify people of spec updates). Separately, seeing a PR on this here would help folks in testing the feature. @substack @sokra @Rich-Harris since you all I believe are involved with the more popular package managers. Do you support the browser field spec (I believe browserify and webpack do but could be mistaken) |
I'm on board 👍 |
Thanks for the direction @defunctzombie 👍 Opened PRs #84 and defunctzombie/package-browser-field-spec#6 |
bumping.. is there anything else required before we can land this? @sokra, @Rich-Harris: do you make use of node-browser-resolve too or do we need to patch something else? |
Related issue browserify/browserify#1539. |
In addition to paths, it would be nice to resolve module names:
Before npm used to dedupe packages, it was possible to reliably do something like:
Happy to open a PR - I just wanted to check if this is desirable or not first.
The text was updated successfully, but these errors were encountered: