mix llv.build (LocalLiveView v0.1.0)

Copy Markdown View Source

Copies LocalLiveView runtime files into the host project and builds the WASM bundle.

Steps

  1. Copies Popcorn runtime files (iframe.mjs, AtomVM.mjs, AtomVM.wasm) from deps/local_live_view/priv/static/ into priv/static/assets/js/. These must be served alongside Phoenix's app.js so Popcorn's import.meta.url-based lookups resolve.
  2. Runs mix build inside local/ to compile the WASM bundle.

Usage

mix llv.build

Add to your setup alias in mix.exs (done automatically by mix llv.install):

defp aliases do
  [setup: ["deps.get", "llv.build", ...]]
end