Skip to content

Instantly share code, notes, and snippets.

@fiatjaf
Created August 18, 2022 12:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fiatjaf/aab334afe6412a10202162d4e1c50053 to your computer and use it in GitHub Desktop.
Save fiatjaf/aab334afe6412a10202162d4e1c50053 to your computer and use it in GitHub Desktop.
Compiling a ScalaJS app with ESModule and CommonJSModule and sbt-esBuild
Results of transpiling and bundling a project that uses Laminar and handful of Scala libraries plus 4 reasonably-sized npm dependencies:
ESModule:
- fastLinkJS => 3.8MB
- fastLinkJS / esBuild => 4.1MB
- fullLinkJS => 3.6MB
- fullLinkJS / esBuild => 2.0MB
CommonJSModule:
- fastLinkJS => 3.8MB
- fastLinkJS / esBuild => 4.1MB
- fullLinkJS => 728K
- fullLinkJS / esBuild => 740K
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment