Skip to content

Added node compat example#1223

Merged
vados-cosmonic merged 4 commits intobytecodealliance:mainfrom
MendyBerger:node-example
Feb 25, 2026
Merged

Added node compat example#1223
vados-cosmonic merged 4 commits intobytecodealliance:mainfrom
MendyBerger:node-example

Conversation

@MendyBerger
Copy link
Contributor

See also #1206

I'm not sure that this fully resolves the issue, as setting this up took quite a bit of research on how to make unenv work nicely with rollup, and someone with a slightly different build setup would have to figure it out on their own.

Having jco bundle in all this polyfill code with the glue code would make the experience so much better.

Also, turns out unenv has a lot more holes than I originally thought. A significant amount of node apis just trap, and there's no clear documentation on what parts are actually implemented.

Copy link
Collaborator

@vados-cosmonic vados-cosmonic left a comment

Choose a reason for hiding this comment

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

Thanks for working on this @MendyBerger -- this example is a great start to showing how to do NodeJS compat ahead of a more built-in integration with Jco/other ecosystem projects.

@vados-cosmonic
Copy link
Collaborator

Looks like GHA is having a bad time -- going to go ahead and merge this in since tests work locally

@vados-cosmonic vados-cosmonic merged commit 1d04288 into bytecodealliance:main Feb 25, 2026
8 of 36 checks passed
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