This is a sample app to implement Vite-integrated MPA (Multiple-Page Application) with CakePHP4.
With this app, you can use these tech stacks.
More detailed is here:
CakePHPのMPAにViteを導入して開発を加速させる⚡️ - Fusic Tech Blog
# Install php dependencies
composer install
# Install node dependencies
pnpm i
# Run CakePHP build-in webserver
bin/cake server -p 8765
# Run vite server
pnpm dev
Visit http://localhost:8765
CakePHP env file needs to be DEBUG="false"
. Modify config/.env
first.
# Rerun CakePHP build-in webserver
bin/cake server -p 8765
# Run vite server
pnpm build