Skip to content

Classes not being loaded in dev mode until Nuxt dev server is restarted #464

@fabis94

Description

@fabis94

Version

@nuxtjs/tailwindcss: 5.0.3
nuxt: 3.0.0-rc.1 (with vite builder)
tailwindcss: 3.0.24

Steps to reproduce

  1. Run nuxt dev server
  2. Add a tailwind class to a Vue component that previously wasn't used anywhere in the project
  3. The new class won't work until you restart dev server

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions