The library …
- provides an igniter.installer to install all the necessary files
- creates elixir and js boilerplate
- configures phoenix LV static file tracking with the manifest vite generates
- uses phoenix static_url configuration to handle all static assets via the vite dev server
- moves static assets from priv/static to assets/public
- provides a heex function component to pull in js/css from
- vite dev server in development
- the vite manifest in prod
- can optionally pull in :bun to run without a locally installed nodejs, just like phoenix does by default
# Fresh project
mix igniter.new my_app --with phx.new --install phoenix_vite [--bun]
# Existing project
mix igniter.install phoenix_vite [--bun]If available in Hex, the package can be installed
by adding phoenix_vite to your list of dependencies in mix.exs:
def deps do
[
{:phoenix_vite, "~> 0.3.0"}
]
endmix phoenix_vite.install [--bun]Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/phoenix_vite.