Optional Vite-style public directory support.
Phoenix apps normally serve stable public files from priv/static through
Plug.Static, so this feature is disabled by default. When enabled for Vite
compatibility, files in the configured public directory are served from the
site root in development and copied as-is to the production static root. They
are not transformed, hashed, or included in the module graph, so application
code should reference them with root-absolute URLs such as /favicon.svg.
Summary
Functions
Copies all files from public_dir into static_root.
Resolves a root-relative request path inside public_dir.
Returns the expanded public directory path, or nil when disabled.
Functions
Copies all files from public_dir into static_root.
Missing public directories are ignored. Existing files at the destination are overwritten, matching the usual behavior of build output generation.
Resolves a root-relative request path inside public_dir.
Returns nil for missing files, directories, disabled public directories, or
paths that would escape the public directory.
Returns the expanded public directory path, or nil when disabled.