mindplay-dk / php-vite-mpa

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PHP-Vite-MPA

Example MPA based on mindplay/vite.

How does it work?

  • The client folder contains the client-side sources.

  • The public folder is the public webroot.

  • In production mode, Vite publishes compiled sources from client into public/dist.

  • In development mode, Vite runs as a proxy server in front of PHP, enabling HMR.

  • The server folder contains the index.php front-controller.

  • In index.php, the mindplay/vite package is used to parse manifest.json and emit tags.

Have a look in index.php and vite.config.ts for more comments and explanations.

Install

nvm use
composer install

Local Development

composer start

Production Preview

composer preview

Production Build

composer build

About


Languages

Language:TypeScript 51.0%Language:CSS 34.7%Language:PHP 14.3%