-
Notifications
You must be signed in to change notification settings - Fork 180
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 CSS HMR breaks when an arbitrary value class with whitespace is used #815
Comments
Thanks for opening and reporting an issue on this repository. Sorry it took me a while to get to this. I tried this without the module on a vanilla installation of Tailwind CSS as well, and the issue seems to be persisting (so it's likely not the module); I wouldn't say it's Nuxt core either, but possibly something with Vite. For now, I can tell you these workarounds:
<script setup>
const myClass = "font-['Times_New_Roman']";
</script>
<template>
<div :class="myClass">
<p>Test Page</p>
</div>
</template> Apologies for this issue - let me see what I can do from my end, meanwhile if you'd like to report on Nuxt/Vite repositories, please feel free to do so! |
Hi @miosenpai - doing a check/followup if a module/Nuxt/Vue/Vite/package update may have fixed this issue overtime? |
@ineshbose Tested with a fresh |
Thanks for confirming. I wonder if it's okay I close this issue and we track in nuxt/nuxt#26454 as we confirmed its not a module (or Nuxt) issue as this happens it with a vanilla install too (perhaps we also try to reproduce this with a Vite + TailwindCSS app). |
Closing this in favour of tracking in nuxt/nuxt#26454 as that has more visibility of Vite and Nuxt core, and has gotten more traction.. 🙂 |
Version
@nuxtjs/tailwindcss: 6.11.4
nuxt: 3.10.3
Reproduction Link
https://stackblitz.com/edit/github-4um3z1
Steps to reproduce
I'm not sure if this bug should be addressed in Nuxt or this module itself so I thought I would start the bug report here (I was not able to reproduce this bug with
npm create vue@latest
so the problem is likely from Nuxt or this module).When an arbitrary value Tailwind class with whitespace is used (e.g.
font-['Times_New_Roman']
), CSS HMR will throw an error on subsequent hard refreshes.@/assets/custom.css
) to trigger CSS HMRs.color: aqua;
tocolor: magenta;
) and save it.What is Expected?
No error should appear.
What is actually happening?
The following error is thrown.
The text was updated successfully, but these errors were encountered: