Currently, most projects do not have working Hot Module Replacement (HMR) in the frontend. In a few cases, it works, but only with workarounds. Since we are moving to Vite long-term and Symfony is expected to switch from Webpack to Vite as well, we need a clean and reusable setup.
Problem:
For HMR to work with DDE, I mapped port 5173 in the Dockerfile and had to modify the Vite config (disabling SSL checks for localhost). While this worked, we need a proper solution that can be used across all projects.
Why?
- A clean Vite integration with full features
- HMR significantly speeds up frontend development by allowing live updates without refreshing, which is especially useful for styling dialogs or components with a specific state.
Solution:
Adjustments in the reverse proxy are needed to:
- Ensure SSL works
- Use the .test domain of each project
- Properly handle port mapping
Currently, most projects do not have working Hot Module Replacement (HMR) in the frontend. In a few cases, it works, but only with workarounds. Since we are moving to Vite long-term and Symfony is expected to switch from Webpack to Vite as well, we need a clean and reusable setup.
Problem:
For HMR to work with DDE, I mapped port 5173 in the Dockerfile and had to modify the Vite config (disabling SSL checks for localhost). While this worked, we need a proper solution that can be used across all projects.
Why?
Solution:
Adjustments in the reverse proxy are needed to: