-
Notifications
You must be signed in to change notification settings - Fork 183
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
Classes not being loaded in dev mode until Nuxt dev server is restarted #464
Comments
Well, on my end:
|
I am experiencing this too. Did anyone find a quick work around? |
I am having the same issue. I am using |
same issue. :(( |
A workaround for local development is to just whitelist every single tailwind class. This adds ~27,000 lines of CSS directly in your head so it's a terrible idea, but it unblocks development - can just disable this config when building for deployments. in
|
By the way, I was able to get that issue consistently reproducing under the playground of this module. The issue starts to reproduce when you add some extra CSS to export default defineNuxtConfig({
buildModules: [
tailwindModule
],
tailwindcss: {
exposeConfig: true
},
css: [
'@fontsource/inter/400.css',
'@fontsource/inter/500.css',
'@fontsource/inter/600.css',
'@fontsource/inter/700.css'
]
}) Also, it requires router to be present, so
Because there is no way for the build system to know dependencies between Vue and CSS, and that HMR should replace the CSS file when your Vue file changes. From bundler point of view these two are completely unrelated, but really CSS content is dependent on markup. I wonder why HMR even worked in the first place. From my understanding, it shouldn't. |
I resolved this issue by adding
|
same problem with
when using default Tailwind CSS file from runtime/tailwind.css instead of creating your own |
Closing this issue as it is believed to be resolved/stale now - please feel free to comment if it is still an issue in the latest version of the module. |
This issue is still occuring
|
Did you solve it? |
bug still exist
|
Still happening.
This also happens when I install tailwind manually (without this module). 🤔 |
same issue . enable disable cache in your browser then refresh that |
Definitely sounds like a cache issue to me! |
youre welcome buddy |
Version
@nuxtjs/tailwindcss: 5.0.3
nuxt: 3.0.0-rc.1 (with vite builder)
tailwindcss: 3.0.24
Steps to reproduce
What is Expected?
The class should be added to the page's CSS immediately after it's used for the first time in the project (e.g. in a Vue component).
What is actually happening?
Class doesn't appear, even after refreshing. Only after nuxt is restarted does the new class get added to the page. OR if the tailwind.css file is saved.
(I don't know why a saved change to tailwind.css causes tailwind to see the new class usage, but a saved change to the vue file that actually uses the class doesn't. The vue file is definitely correctly specified under 'content' in the tailwind config, otherwise it wouldn't even work after restarting the dev server)
The text was updated successfully, but these errors were encountered: