Vite

Build Status

Vite helps you to integrate Vite.js with Phoenix.

Configuration

# in config/config.exs

config :vite_phx,
  main_file: "src/main.tsx",
  endpoint: MyAppWeb.Endpoint, # required get the :cache_static_manifest config
  environment: Mix.env(), # to tell prod and dev env appart
  cache_static_manifest: "priv/static/cache_manifest.json" # optional

Installation

If available in Hex, the package can be installed by adding vite to your list of dependencies in mix.exs:

def deps do
  [
    {:vite_phx, "~> 0.1.0"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/vite.