Skip to content

Exclude os module from bundler to avoid browser polyfill.#124

Merged
thegecko merged 1 commit intoARMmbed:masterfrom
microbit-carlos:fix/os-platform
Mar 12, 2026
Merged

Exclude os module from bundler to avoid browser polyfill.#124
thegecko merged 1 commit intoARMmbed:masterfrom
microbit-carlos:fix/os-platform

Conversation

@microbit-carlos
Copy link
Copy Markdown
Contributor

@microbit-carlos microbit-carlos commented Mar 11, 2026

It's only used in src/transport/hid.ts, which needs to avoid having the bundler add this browser polyfill.

This looks like the simplest fix, as the os is not used by any of the browser related files.

Fixes #123.

It's only used in src/transport/hid.ts, which does not need the
polyfill.

Fixes ARMmbed#123.
@thegecko thegecko merged commit e6ffbb0 into ARMmbed:master Mar 12, 2026
1 check passed
@microbit-carlos microbit-carlos deleted the fix/os-platform branch March 12, 2026 12:15
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.

HID transport issue on Windows, os.platform() returns "browser" when run from node

2 participants