esbuild
esbuild copied to clipboard
Very simple SystemJS format support
Implements https://github.com/evanw/esbuild/issues/192.
The benefit of outputting the SystemJS module format is being able to use code splitting workflows in non modules browsers.
This does not include support for live bindings, and will likely have edge cases still to be worked out.
There is repetition between chunk import/export rendering and entry point export rendering. Ideally these separate codepaths could be combined. See for example in RollupJS here how finalizers use their own import/export data structures to render to any format using this interface - https://github.com/rollup/rollup/blob/master/src/finalisers/index.ts#L11. Fully separating the finalizers also avoids cluttering the rendering code with format gating which isn't ideal here.
Very much open to feedback on this PR if you have suggestions for improvements. And let me know if you have any other questions about the format as well.
Any progress on this?
@evanw if this were updated, would it be accepted? (Asking based on this comment https://github.com/evanw/esbuild/issues/192#issuecomment-650604222)
SystemJS support is the last requirement I have from being able to adopt esbuild, which I very much would like to do! What are the blockers to supporting SystemJS?
@evanw if this were updated, would it be accepted? (Asking based on this comment https://github.com/evanw/esbuild/issues/192#issuecomment-650604222)
Not right now. That comment is still accurate. And in addition to that comment, I'm in the middle of a rewrite of most of the linker to address code splitting limitations, support top-level await, and add other features. Supporting yet another output format would also make that rewrite harder.
Up
@evanw if this were updated, would it be accepted? (Asking based on this comment #192 (comment))
Not right now. That comment is still accurate. And in addition to that comment, I'm in the middle of a rewrite of most of the linker to address code splitting limitations, support top-level await, and add other features. Supporting yet another output format would also make that rewrite harder.
I’m use single-spa for microfrontend with systemjs, If this format is supported, it would be really appreciated! Any progress