Skip to content
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

[node-resolve]: Support "browser" field external mappings #472

Closed
guybedford opened this issue Jun 23, 2020 · 6 comments
Closed

[node-resolve]: Support "browser" field external mappings #472

guybedford opened this issue Jun 23, 2020 · 6 comments

Comments

@guybedford
Copy link
Contributor

  • Rollup Plugin Name: node-resolve
  • Rollup Plugin Version: latest

Feature Use Case

The package.json "browser" field supports external mappings of the form:

{
  "browser" {
    "external": "newexternal",
    "./local.js": "external/subpath"
  }
}

For example see https://github.com/sodium-friends/sodium-universal/blob/master/package.json#L14

Feature Proposal

By default the node-resolve plugin is currently handling these as local package paths instead of external resolutions as they should be.

@volkanunsal
Copy link

This is very much needed.

@shellscape
Copy link
Collaborator

@volkanunsal we'd happily review a pull request that fulfilled this request

@stale stale bot removed the x⁷ ⋅ stale label Aug 29, 2020
@stale stale bot added the x⁷ ⋅ stale label Oct 28, 2020
@stale
Copy link

stale bot commented Oct 29, 2020

Hey folks. This issue hasn't received any traction for 60 days, so we're going to close this for housekeeping. If this is still an ongoing issue, please do consider contributing a Pull Request to resolve it. Further discussion is always welcome even with the issue closed. If anything actionable is posted in the comments, we'll consider reopening it.

@stale stale bot closed this as completed Oct 29, 2020
@guybedford
Copy link
Contributor Author

I'm going to reopen this one as it seems like an important omission in the default resolution behaviour unless I've missed that it's been addressed already.

@guybedford guybedford reopened this Oct 29, 2020
@stale stale bot removed the x⁷ ⋅ stale label Oct 29, 2020
@volkanunsal
Copy link

I looked at the source code to potentially provide a patch for it, but the resolution algorithm is so convoluted and written in an idiosyncratic way. I can't make head or tail of it.

@stale
Copy link

stale bot commented Feb 21, 2021

Hey folks. This issue hasn't received any traction for 60 days, so we're going to close this for housekeeping. If this is still an ongoing issue, please do consider contributing a Pull Request to resolve it. Further discussion is always welcome even with the issue closed. If anything actionable is posted in the comments, we'll consider reopening it.

@stale stale bot closed this as completed Feb 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants