mix vitex.install (Vitex v0.1.0)

View Source

Installs and configures Phoenix Vite in a Phoenix application using Igniter.

This installer:

  1. Creates vite.config.js with appropriate configuration
  2. Updates package.json with Vite dependencies and scripts
  3. Adds the Vite watcher to the development configuration
  4. Updates the root layout template to use Vite helpers
  5. Creates or updates asset files for Vite

Usage

$ mix vitex.install

Options

--ssr                Enable Server-Side Rendering support
--tls                Enable automatic TLS certificate detection
--react              Enable React Fast Refresh support
--typescript         Enable TypeScript support
--inertia            Enable Inertia.js support (automatically enables React)
--yes                Don't prompt for confirmations

Summary

Functions

create_vite_config(igniter)

maybe_add_inertia_dep(igniter)

maybe_setup_inertia(igniter)

remove_old_watchers(igniter)

setup_assets(igniter)

setup_html_helpers(igniter)

setup_watcher(igniter)

update_mix_aliases(igniter)

update_package_json(igniter)

update_root_layout(igniter)

update_vendor_imports(igniter)