Skip to content

Fix remove-node-module-import#53

Merged
davidkpiano merged 1 commit intostatelyai:mainfrom
josephfh:fix/remove-node-module-import
Apr 8, 2026
Merged

Fix remove-node-module-import#53
davidkpiano merged 1 commit intostatelyai:mainfrom
josephfh:fix/remove-node-module-import

Conversation

@josephfh
Copy link
Copy Markdown
Contributor

@josephfh josephfh commented Apr 8, 2026

The require() call in createSkyInspector.ts causes rolldown to emit import { createRequire } from "node:module" in dist/index.mjs, breaking browser usage of the package.

Since isomorphic-ws provides a browser-safe entry via its "browser" field in package.json, this fix uses a static ESM import instead of require().

Tested in Vite, seems to fix the issue :)

@josephfh josephfh changed the title fix/remove-node-module-import Fix remove-node-module-import Apr 8, 2026
Copy link
Copy Markdown
Member

@davidkpiano davidkpiano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks!

@davidkpiano davidkpiano merged commit 5a8b2e5 into statelyai:main Apr 8, 2026
2 checks passed
@josephfh josephfh deleted the fix/remove-node-module-import branch April 9, 2026 08:06
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