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
intopublic/dist
. -
In development mode, Vite runs as a proxy server in front of PHP, enabling HMR.
-
The
server
folder contains theindex.php
front-controller. -
In
index.php
, themindplay/vite
package is used to parsemanifest.json
and emit tags.
Have a look in index.php
and vite.config.ts
for more comments and explanations.
nvm use
composer install
composer start
/dist
from the URL after opening. (if you know how to fix this, please open an issue or PR in the main repository.)
composer preview
composer build