cytopia / cytopia/devilbox

[Howto]: Use PHP and Vite simultaneously in the same project

Open
#1,007 2 comments 0 reactions 0 assignees View on GitHub
Community help wanted question
Dominant language
PHP
Stars
4.5k
Forks
652
PR merge metrics
No merged PRs in 30d

Description

### Have you already checked elsewhere?

- [ ] I have read the [Devilbox documentation](https://devilbox.readthedocs.io/en/latest/)
- [ ] I have checked the [Devilbox Troubleshooting Guide](https://devilbox.readthedocs.io/en/latest/)
- [ ] I have checked the [Devilbox FAQ](https://devilbox.readthedocs.io/en/latest/support/faq.html)
- [ ] I have checked the [Devilbox Howto](https://devilbox.readthedocs.io/en/latest/support/howto.html)
- [ ] I have checked the [Devilbox Forum](https://devilbox.discourse.group/)
- [ ] I have checked [existing issues](https://github.com/cytopia/devilbox/issues)
- [ ] I have googled already with no luck
- [ ] I have not done any of the above

### What are you struggling with?

I want to use both PHP and Vite in the same project.
When switching to the browser, it should open index.php , inside which is connected localhost:5173/@vite/client .

If you run Node JS inside shell.sh , nothing works, and if run outside the container, everything works.

I tried to set up reverse proxying, then Vite opens in the browser, but it doesn't work index.php

(Windows 11 + WSL2)

### What have you tried already?

-

### What is your goal?

-

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.