Skip to content

dev-server "hot" reloading with Tailwind JIT #1026

@fabriciojs

Description

@fabriciojs

Hello! This is probably more like a question than any bug/feature report, so please let me know if this is out of order as an issue here.

I have setup Tailwind with their JIT mode. I figure out the proper setup and everything works good except for the Hot reloading - it DOES update the new CSS bundle upon an HTML file change... but, it does not hot-reload my HTML change.

The dev-server output (working as expected):

image

The WS is connected and working as expected, as far as I can tell:

image

But, I don't see my change taking effect until I manually refresh the page - thus, loading the changed HTML.

I assume this is a scenario specific to how Tailwind JIT works when my CSS automatically changes as I write the HTML markup.

The Encore docs on HMR indeed showcase the ability to reloading CSS and JS only, not mentioning HTML itself.

I could not find a way (looking at webpack-dev-server) to maybe change this.

So - is it possible to do something here to get a better Developer Experience for the Hot Reloading including HTML changed? I know that is it a Symfony backend serving the markup, so it's not simply static HTML to "watch" and it's not the responsibility of webpack-dev-server itself to do so. But maybe if I could hook up a page refresh myself, or if we could use some Turbo frame mix to achieve this, that would be great.

Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions