You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's currently a limitation in the melange rules + dune integration where the Melange runtime/stdlib is emitted to JS, in its entirety, for every melange.emit stanza.
This happens for a few reasons:
melange.emit is "total": one melange (target emit-folder) is self-contained and (hopefully) contains everything needed to run that application
this is by design and makes both rule implementation easier and adheres to the principle of least surprise
The Dune / ocamldep level of granularity for external dependencies are currently libraries, which means
to get around the emission time for melange.emit with (emit_stdlib true), we could:
publish e.g. a @melange/melange NPM package
use emit_stdlib false in more situations
consume the melange runtime/stdlib from NPM
the tradeoff here is that it might become a bit harder to consume dev versions of melange between releases (the opam package / runtime npm package must be in sync)
The text was updated successfully, but these errors were encountered:
There's currently a limitation in the melange rules + dune integration where the Melange runtime/stdlib is emitted to JS, in its entirety, for every
melange.emit
stanza.This happens for a few reasons:
melange.emit
is "total": one melange(target emit-folder)
is self-contained and (hopefully) contains everything needed to run that applicationocamldep
level of granularity for external dependencies are currently libraries, which meansAn alternative workaround for this issue is #620:
melange.emit
with(emit_stdlib true)
, we could:@melange/melange
NPM packageemit_stdlib false
in more situationsThe text was updated successfully, but these errors were encountered: