This repository has been archived by the owner on Aug 4, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 86
node-resolve ignoring package.browser module: false #197
Comments
Additionally it is also ignoring the next line "xmlhttprequest-ssl": "./lib/xmlhttprequest.js", so maybe the browser: true property is not propagated for recursively resolved modules? |
My rollup setup
|
index.ts
|
package.json
|
I'm also having the same problem with a package which imports uuid internally. It seems like the browser mapping is not being respected in nested dependencies. Seems like there have been a few regressions of this bug before and PR #143 seems related. |
should be solve in PR #183, |
PR merged. Can we close? |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm trying to bundle socket.io-client, however, it has a dependency engine.io-client, which uses a module named "ws" while in node and in the browser it use the native websocket object. In it's package.json in the browser section it specifies that "ws":false such that other module bundlers seem to know to leave it out.
It doesn't look like rollup-plugin-node-resolve is respecting this and is importing the module anyway causing the bundle to break in the browser. Is this a bug or is this an unimplemented feature?
https://github.com/socketio/engine.io-client/blob/master/package.json#L71
The text was updated successfully, but these errors were encountered: