Skip to content

Livewire 3 - Laravel 11 - Tailwind CSS double refresh issue with HMR #309

@FHoulbreque

Description

@FHoulbreque

Vite Plugin Version

1.0.6

Laravel Version

11.33.2

Node Version

18.20.4

NPM Version

10.9.0

Operating System

Windows

OS Version

11 (23H2)

Web browser and version

Google Chrome 131.0.6778.86 (Official build) (64 bits)

Running in Sail?

No

Description

While progressing through development of my code (here it's coming from a course on Laracast) I encountered a strange behaviour with HMR:

  • When saving any change in the blade file, the page reload as intended
  • When changing PHP on the server side, it doesn't reload, which is I think normal as well.
  • But when interacting with input with wire:model or not on it, the page reload and reset the state. It doesn't occur every time, it generally occurs when there has been a change either on the blade or the PHP part of a liverwire component.

Steps To Reproduce

  • Change a file in a Livewire component
  • Observe an unwanted reload of the page while typing in an input field

Reproduction

https://github.com/FHoulbreque/vite-livewire-hmr-bug

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