Track Scala.js bundle size in CI with BundleMon. Check out an example PR.
-
Install the BundleMon App on your repository.
-
In
project/plugins.sbt
add:
addSbtPlugin("com.armanbilge" % "sbt-bundlemon" % "0.1.3")
- Enable the plugin on one or more applications in your
build.sbt
(or anything that exports to JavaScript):
lazy val todoMvc = project.in(file("todo-mvc"))
.enablePlugins(BundleMonPlugin)
.settings(
scalaJSUseMainModuleInitializer := true
)
- Add the following step to your CI workflow:
- name: Monitor bundle size
run: sbt bundleMon
- Now you will get reports about the gzipped, fully-optimized bundle size in CI status and PR comments!
Please open issues and PRs for anything and everything :)