You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enabling the 'newResolver' feature causes build failures when importing packages that use the browser field in package.json to avoid importing code intended for Node.js.
System Info
System:
OS: macOS 12.4
CPU: (10) arm64 Apple M1 Max
Memory: 22.38 GB / 64.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 20.5.0 - ~/Library/Caches/fnm_multishells/61564_1700104358947/bin/node
Yarn: 1.22.17 - ~/.yarn/bin/yarn
npm: 9.8.0 - ~/Library/Caches/fnm_multishells/61564_1700104358947/bin/npm
pnpm: 8.10.5 - ~/Library/Caches/fnm_multishells/61564_1700104358947/bin/pnpm
bun: 0.8.1 - ~/.bun/bin/bun
Browsers:
Chrome: 119.0.6045.105
Safari: 15.5
Details
Enabling the 'newResolver' feature causes build failures when importing packages that use the
browser
field inpackage.json
to avoid importing code intended for Node.js.As an example, this is what the
package.json
looks like in thevscode-languageserver
package:https://github.com/microsoft/vscode-languageserver-node/blob/4812428a8621dff4153282407fc71494b994eda3/server/package.json#L15-L18
When building with Webpack, the
browser
field is respected, and we don't get any files from thelib/node
directory.When building with rspack, we end up with files from the
lib/node
directory, which causes errors.This is probably related to #4446
Reproduce link
https://github.com/JohnDaly/rspack-new-resolver-browser-alias-bug
Reproduce Steps
pnpm run build:rspack
error[internal]: Resolve error
errors in the terminalThe text was updated successfully, but these errors were encountered: