Open jaked opened 6 months ago
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.)
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.