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 classname-scanning doesn't work for notebook cells #3

Open
jaked opened this issue Apr 24, 2024 · 1 comment
Open

tailwind classname-scanning doesn't work for notebook cells #3

jaked opened this issue Apr 24, 2024 · 1 comment

Comments

@jaked
Copy link
Collaborator

jaked commented Apr 24, 2024

Tailwind scans input files for classnames, but it doesn't scan notebook cells that haven't been written to the filesystem. So a classname might work if it's used elsewhere, but using it only in a notebook cell doesn't work.

I think it might be possible to fix this in the Vite/Tailwind integration?

Another approach (that would work more generally for build steps that depend on the filesystem) might be to serve cell contents via a user-space filesystem.

@jaked
Copy link
Collaborator Author

jaked commented May 6, 2024

looked into the Vite / Tailwind integration:

it's really filesystem-oriented — plugins can register file dependencies and be notified when the files change (Vite handles this with its watch infra), and Tailwind scans the files directly to learn what utility classes exist (it doesn't go through the Vite module mechanism). I don't see a easy way to hook this up to notebook cells without writing them individually to the filesystem.

maybe it's possible to virtualize the watcher / filesystem APIs somehow, so the Tailwind plugin isn't talking directly to the filesystem? (Sort of the inverse of the idea above to server a user-space filesystem.)

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

No branches or pull requests

1 participant