Skip to content

Multiple @source in the same directory doesn't load all sources #16164

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

Closed
RomainMazB opened this issue Feb 1, 2025 · 6 comments
Closed

Multiple @source in the same directory doesn't load all sources #16164

RomainMazB opened this issue Feb 1, 2025 · 6 comments

Comments

@RomainMazB
Copy link

RomainMazB commented Feb 1, 2025

What version of Tailwind CSS are you using?

For example: v4.0.3

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

For example: laravel-mix 6.0.49

What version of Node.js are you using?

For example: v12.0.0

What browser are you using?

N/A

What operating system are you using?

Linux

Describe your issue
Working with Vue & Laravel, I wanted to load classes from the js directory and the views one as well:

@import 'tailwindcss' source(none);
@source '../js'
@source '../views'

This actually doesn't work as expected, no matter which order I chose, only the classes contained in the views directory are analyzed.

That said, this undocumented config works:

@import "tailwindcss" source(none);
@source '../{js,views}'

But I suspect that the one mentioned in the documentation isn't working if used in a project:

@import "tailwindcss" source(none);
@source "../admin";
@source "../shared";
@wongjn
Copy link
Contributor

wongjn commented Feb 1, 2025

Would you be able to provide a full reproduction please (such as a remotely-hosted git repository)?

@philipp-spiess
Copy link
Member

Hey! I was trying to reproduce this in our Vite playground but it seems to be working as expected in my setup. Do you mind sharing a minimal git repository that reproduces this issue?

@RomainMazB
Copy link
Author

Hey! I was trying to reproduce this in our Vite playground but it seems to be working as expected in my setup. Do you mind sharing a minimal git repository that reproduces this issue?

May I have access to this Vite playground?

@RobinMalfait
Copy link
Member

@RomainMazB It's a very basic setup you can find here: https://github.com/tailwindlabs/tailwindcss/tree/main/playgrounds/vite

@philipp-spiess
Copy link
Member

@RomainMazB Hey! Quick nudge regarding the repro. Unfortunately there's not much we can do since this is working when we tested it :/

@philipp-spiess
Copy link
Member

Going to close this issue for now as we can't really look into this without a reproduction (this was working when I tried it in a small Vite playground). Feel free to reopen an issue when you have a small repo to attach but for now I'm going to close this one. Thanks for your understanding!

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

No branches or pull requests

4 participants