• This looks promising for vanilla PHP projects

    Two questions:

    How does this differ from Laravel's Vite plugin? I'm curious if there are specific advantages for non-framework PHP apps, or if the component system offers something unique.

    When a PHP component changes, does it trigger a full page reload or partial re-render of just that component?

    • Laravel’s plugin is tightly coupled to Laravel’s build system (Blade, mix manifest, etc.). vite-plugin-php is framework-agnostic — it works with plain PHP or any other custom setup. In comparison: you do not need custom instructions to load assets, supported by Vite or it's plugins. It basically brings the normal Vite dev experience (HMR, asset resolution) to PHP projects.

      The PHP-component system is a simpler way to work with partials and without an additional templating language liek Blade — think of it like JSX, but for PHP. You use JSX like syntax, then it compiles down to normal PHP calls.