-
-
Notifications
You must be signed in to change notification settings - Fork 109
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
Package entry resolution fails when "browser" is an object #910
Comments
have you considered https://github.com/lukeed/resolve.exports ? |
Er, already what's used, per my comment above. Not sure I follow? |
brain fart, sorry :) |
Hi rschristian, how can this be resolved? My browser balks at bn.js. I don't fully understand the problem. |
@kvanstee Well ideally I think I don't know if we correctly handle the |
@rschristian I notice a previous unresolved issue #784 mentions the same code that you do. Also there is a comment that a commit on npm-refactor2 solves the issue. Will the commit solve this issue as well (if it's not the same)? I have cloned npm-factor2 but can't get the yarn commands to compile the code. Do you have a wmr.cjs that does not break with bn.js? |
Ah yep, good find. This is indeed a duplicate.
Will the commit solve the issue? It might? I'd have to go digging through each commit to see which one did it, but that branch replaces the NPM plugin entirely. The change that corrects the issue is likely built upon a whole lot of other changes.
|
Hi! |
@bakeiro There's no one actively working on WMR these days, no. Unless you'd like to submit a fix, it's unlikely to be resolved. |
Brought up by #909
When a package's
"browser"
field is an object,resolve.exports
will return the entire object, not a string file path:See resolve.exports#optionsbrowser
This presents an issue in packages like
bn.js
:wmr/packages/wmr/src/plugins/npm-plugin/resolve.js
Lines 10 to 17 in 9a6777f
entry
is{ buffer: false }
, not an import/file path. Besides the immediate issue of.replace
not working, we'll need to fallback to"main"
most likely.The text was updated successfully, but these errors were encountered: