https://github.com/naoyamiyagawa/cakephp4-vite
vite integration for mpa (cakephp4)
https://github.com/naoyamiyagawa/cakephp4-vite
cakephp4 tailwind-css typescript vite vue
Last synced: 3 months ago
JSON representation
vite integration for mpa (cakephp4)
- Host: GitHub
- URL: https://github.com/naoyamiyagawa/cakephp4-vite
- Owner: NaoyaMiyagawa
- Created: 2022-02-20T09:48:06.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-03-12T03:15:16.000Z (over 4 years ago)
- Last Synced: 2025-10-10T10:36:12.444Z (9 months ago)
- Topics: cakephp4, tailwind-css, typescript, vite, vue
- Language: PHP
- Homepage:
- Size: 347 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CakePHP4 MPA integrated Vite
This is a sample app to implement Vite-integrated MPA (Multiple-Page Application) with CakePHP4.
With this app, you can use these tech stacks.
- [CakePHP4](https://book.cakephp.org/4/en/index.html)
- [Vite](https://ja.vitejs.dev/)
- [TypeScript](https://www.typescriptlang.org/)
- [Scss](https://sass-lang.com/)
- [Vue3](https://vuejs.org/)
More detailed is here:
[CakePHPのMPAにViteを導入して開発を加速させる⚡️ - Fusic Tech Blog](https://tech.fusic.co.jp/posts/2022-03-03-cakephp-vite-mpa/)
## Installation
```bash
# Install php dependencies
composer install
# Install node dependencies
pnpm i
```
## Dev
```bash
# Run CakePHP build-in webserver
bin/cake server -p 8765
# Run vite server
pnpm dev
```
Visit `http://localhost:8765`
## Prod
CakePHP env file needs to be `DEBUG="false"`. Modify `config/.env` first.
```bash
# Rerun CakePHP build-in webserver
bin/cake server -p 8765
# Run vite server
pnpm build
```