Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vite server.origin breaks tailwind JIT HMR #5877

Closed
leevigraham opened this issue Oct 26, 2021 · 4 comments
Closed

vite server.origin breaks tailwind JIT HMR #5877

leevigraham opened this issue Oct 26, 2021 · 4 comments

Comments

@leevigraham
Copy link

leevigraham commented Oct 26, 2021

What version of Tailwind CSS are you using?

2.2.17

What build tool (or framework if it abstracts the build tool) are you using?

vite 2.6.10

What version of Node.js are you using?

12

What browser are you using?

Firefox / Chrome / Safari

What operating system are you using?

macOS

Reproduction URL

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

Describe your issue

Vite added a new server.origin property to it's config which: "Defines the origin of the generated asset URLs during development.". This is required for laravel or other backend rendered sites.

Setting the server.origin property breaks tailwind JIT HMR when editing templates. It looks like tailwind isn't even re-rendering the CSS. Editing the .pcss file works as expected.

Repro README has steps to reproduce the issue: https://github.com/leevigraham/vite-hmr-issue-repro/blob/main/README.md

My gut feeling is that this issue is more Vite than Tailwind.

Related vite issue: vitejs/vite#5408

@khalwat
Copy link

khalwat commented Oct 26, 2021

Am seeing this issue as well

@khalwat
Copy link

khalwat commented Oct 26, 2021

@khalwat
Copy link

khalwat commented Nov 8, 2021

Looks like they've fixed it (no release cut yet tho): vitejs/vite#5571

@leevigraham
Copy link
Author

Closing this because it's an upstream vite issue and likely fixed in vitejs/vite#5571

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants