esbuild icon indicating copy to clipboard operation
esbuild copied to clipboard

Very simple SystemJS format support

Open guybedford opened this issue 4 years ago • 5 comments

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.

guybedford avatar Jul 13 '20 16:07 guybedford

Any progress on this?

shrinktofit avatar Oct 09 '20 08:10 shrinktofit

@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?

joeljeske avatar Feb 03 '21 15:02 joeljeske

@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.

evanw avatar Feb 03 '21 23:02 evanw

Up

lifeart avatar Dec 30 '21 21:12 lifeart

@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

pmjhonwang avatar Feb 08 '22 07:02 pmjhonwang