Skip to content

fix: Make optional Node module lookups bundler-safe#2237

Merged
dcodeIO merged 2 commits into
masterfrom
patch/reinquire
May 9, 2026
Merged

fix: Make optional Node module lookups bundler-safe#2237
dcodeIO merged 2 commits into
masterfrom
patch/reinquire

Conversation

@dcodeIO

@dcodeIO dcodeIO commented May 8, 2026

Copy link
Copy Markdown
Member

Fixes the internal optional module lookups that can confuse bundlers after util.inquire was inlined.

fs is now resolved through a literal optional require, with a browser field mapping so browser bundles receive an empty stub that is normalized to null. Buffer is read from the runtime environment instead of going through util.inquire, and Long is resolved through a literal optional require("long") so bundlers can include it normally.

Also marks util.inquire as deprecated so we can remove it in a future release.

Supersedes #2226.
Follow-up to #2146.

@dcodeIO dcodeIO requested a review from alexander-fenster May 8, 2026 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants