Skip to content

Enable Proper Hot Module Replacement (HMR) with Vite #95

@mawiswiss

Description

@mawiswiss

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:

  1. Ensure SSL works
  2. Use the .test domain of each project
  3. Properly handle port mapping

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions