Skip to content

HMR not working with backend integration  #101

Description

@jvanmaaren

Describe the bug

Hi all, I have a problem I hope you can help me with

During development any changes to Javascript doesn't update the DOM, although the server and console both report "[vite] hot updated: /App.tsx"

Reproduction

https://github.com/jvanmaaren/vite-update-problem

Steps to reproduce

Setup
I'm using a backend integration:
https://vitejs.dev/guide/backend-integration.html#backend-integration

Python is running on port 8000 and is including the dev environment
Vite is running on port 8080

To reproduce:

  • Install packages: yarn
  • View some-other-server/index.html on port 8000, for instance using: cd some-other-server && python3 -m http.server 8000
  • Run the dev server: yarn dev
  • View localhost:8000
  • Now change the text in App.tsx

System Info

  System:
    OS: macOS 13.2
    CPU: (8) x64 Intel(R) Core(TM) i5-8279U CPU @ 2.40GHz
    Memory: 989.95 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.15.0 - ~/.nvm/versions/node/v16.15.0/bin/node
    Yarn: 1.22.15 - ~/.nvm/versions/node/v16.15.0/bin/yarn
    npm: 8.5.5 - ~/.nvm/versions/node/v16.15.0/bin/npm
  Browsers:
    Chrome: 109.0.5414.119
    Chrome Canary: 112.0.5574.0
    Edge: 109.0.1518.70
    Firefox: 109.0.1
    Safari: 16.3
  npmPackages:
    @vitejs/plugin-react: 3.1.0 => 3.1.0
    vite: 4.1.1 => 4.1.1

Used Package Manager

yarn

Logs

No response

Validations

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions