Many npm packages fail to run with jco transpile because they depend on NodeJS built-ins and globals like Buffer and process that are missing in wasi environments. I'd like to propose adding a Node compatibility mode to automatically polyfill these APIs and inject required globals during the componentization process.
This integration would allow jco to handle node:* imports and common globals out of the box, making the massive npm ecosystem significantly more accessible to the Component Model with a simple flag like --node-compat.
Many npm packages fail to run with
jco transpilebecause they depend on NodeJS built-ins and globals likeBufferandprocessthat are missing in wasi environments. I'd like to propose adding a Node compatibility mode to automatically polyfill these APIs and inject required globals during the componentization process.This integration would allow jco to handle
node:*imports and common globals out of the box, making the massive npm ecosystem significantly more accessible to the Component Model with a simple flag like--node-compat.