Skip to content

sealambda/phoenix_vite

 
 

Repository files navigation

PhoenixVite

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

Installation

Igniter

# Fresh project
mix igniter.new my_app --with phx.new --install phoenix_vite [--bun]
# Existing project
mix igniter.install phoenix_vite [--bun]

Manual

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"}
  ]
end
mix 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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Elixir 97.9%
  • TypeScript 2.1%