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

Tailwind classes aren't generated for new page files #12255

Closed
1 task done
blakej115 opened this issue Oct 18, 2024 · 3 comments
Closed
1 task done

Tailwind classes aren't generated for new page files #12255

blakej115 opened this issue Oct 18, 2024 · 3 comments
Labels
needs response Issue needs response from OP needs triage Issue needs to be triaged

Comments

@blakej115
Copy link

Astro Info

Astro                    v4.16.6
Node                     v20.18.0
System                   Linux (x64)
Package Manager          npm
Output                   static
Adapter                  none
Integrations             @astrojs/tailwind

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

When a new page file is created, and I add a Tailwind class to it, ex: text-[123px] the class is not automatically generated. If I go and make any edit to any other file that's already being watched, Tailwind/Astro will suddenly pick up the new page file and start working.

Is this supposed to function this way? I am using WSL Ubuntu on Windows.

What's the expected result?

I expect new files to be recognized immediately and be able to generate Tailwind classes from them, rather than having to edit an unrelated existing file to get the changes to be picked up.

The issue is replicable in Stack Blitz, however, the issue only happens sometimes on some new file creations, which seems to be random. When I tested on my local system (WSL Ubuntu through Windows), the issue seemed to happen every time I created a new page file.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-hnqfn3?file=src%2Fpages%2Ffoo-bar.astro

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Oct 18, 2024
@bluwy
Copy link
Member

bluwy commented Oct 18, 2024

Does this also happen in a plain Vite app? I don't think Astro affects how tailwind watches files. Is it also happening specifically on Astro files?

@ematipico ematipico added the needs response Issue needs response from OP label Oct 25, 2024
@ematipico
Copy link
Member

@blakej115, could you please answer our question?

@bluwy
Copy link
Member

bluwy commented Nov 1, 2024

It's a bug in Vite: vitejs/vite#18552

@bluwy bluwy closed this as not planned Won't fix, can't repro, duplicate, stale Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs response Issue needs response from OP needs triage Issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

3 participants