View Source VitePhoenix (vite_phoenix v0.1.2)

An experimental light-weight module to help with integrating Vite into your Phoenix project and watching for any code change in Vite's side.

This module is basically a simplified version of the esbuild module that comes with Phoenix framework.

profiles

Profiles

To simplify the usage, while vite_phoenix retains the ability to let user define multiple profiles, it also comes with a default config hard-coded inside the module, so that users won't need to provide the whole profile in their config.exs.

project-name

Project name

That being said, in order to make it work with arbitrary project names set up by Vite during npm create vite@latest, users still need to define the project name in config.exs that matches the folder name under assets/js. The config should look like this:

config :vite_phoenix, project_name: "my-vite-project"

Link to this section Summary

Link to this section Functions

@spec config_for(atom()) :: Keyword.t()
Link to this function

run(profile, extra_args)

View Source
@spec run(atom(), [binary()]) :: non_neg_integer()