Skip to content

server.origin breaks HMR (tailwind JIT)  #5408

Closed
@leevigraham

Description

Describe the bug

Setting the server.origin property in vite.config.ts breaks tailwind JIT hmr.

Fixing the vite version to 2.5.10 fixes the issue (server.origin didn't exist so that makes sense).

Reproduction steps in the repro README: https://github.com/leevigraham/vite-hmr-issue-repro/blob/main/README.md

Reproduction

https://github.com/leevigraham/vite-hmr-issue-repro

This is the simplest repro I could make. It uses the built in vite dev server.

System Info

System:
    OS: macOS 11.6
    CPU: (8) x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
    Memory: 85.16 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 12.22.4 - /usr/local/bin/node
    npm: 6.14.14 - /usr/local/bin/npm
  Browsers:
    Chrome: 95.0.4638.54
    Edge: 90.0.818.56
    Firefox: 88.0
    Firefox Developer Edition: 94.0
    Safari: 15.0
    Safari Technology Preview: 15.4
  npmPackages:
    vite: ^2.6.4 => 2.6.10 

Used Package Manager

npm

Logs

No response

Validations

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