Merged
Conversation
jonatanklosko
commented
Feb 20, 2026
Comment on lines
+13
to
+20
| # In case Livebook is used as a library as in nerves_livebook, | ||
| # the assets.setup is not called, so we use this custom compiler | ||
| # to invoke the task and make the assets work transparently. | ||
| if not File.exists?(priv_static_dir) do | ||
| Mix.shell().info("Generating priv/static") | ||
|
|
||
| :ok = Mix.Task.run("assets.setup") | ||
| end |
Member
Author
There was a problem hiding this comment.
Perhaps we could change nerves_livebook to invoke the task, but I think making it work transparently is good. @josevalim wdyt?
josevalim
approved these changes
Feb 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3106.
Having bun, we no longer depend on global node installation, so I removed the static files from the git repo and we no longer build it on CI. If someone installs escript from GitHub, it will just build the assets behind the scenes (as in all other cases).
I also migrated from esbuild to vite and setup HMR for dev. A vite full build is a bit slower (~1.5s -> ~6.5s), but in dev the dev server rebuilds are slightly more instant, plus I enabled stateful LV update (which works together with HMR) and now styling changes work without reloading the page. There are other DX improvements, for example compilation errors are shown in a popup, while in esbuild the only feedback is logs mixed with phoenix logs.
While at it, I changed jest for vitest and updated all js deps.