bytecodealliance / ComponentizeJS

JS -> WebAssembly Component
Apache License 2.0
242 stars 32 forks source link

Bundler step #46

Closed guybedford closed 8 months ago

guybedford commented 1 year ago

When componentizing a JS application, we should including a JS bundler to build the JS file first before componentization.

This could support both TypeScript as well as node_modules and local imports being bundled in, down to the WIT dependencies being treated as externals.

We do need to be careful here with error messages to be sure that WIT / componentization issues can be correctly debugged.

guybedford commented 1 year ago

This came up at CTW again as well, and while I reiterated the arguments around hesitance to assume dependence on this level of the ecosystem.

At the same time I have a lot of empathy for the use case, and the level of expectations JS developers have for ecosystem tools at this point.

I think WinterCG compat would at the very least be a prerequisite here first.

guybedford commented 8 months ago

With the current StarlingMonkey approach, static source collection happens at preinitialization time, effectively as its own bundle system. So this is no longer necessary.