Open ItzShubhamDev opened 11 months ago
Firstly, you declared the plugins
array twice in your config so not sure what that's going to do.
I had a similar situation setting this up with Svelte. The Vite setup for Tailwind includes PostCSS which strips all CSS that is not present in your HTML and since you have no dark classes in the HTML the resulting CSS file will have no classes for you. This is serious problem for something like Nightwind since it dynamically sets classes based on the mode you toggle to and the build CSS will not have these "opposite" classes.
I could only get this to work when disabling PostCSS and using the unprocessed Tailwind CSS file. If there is a way to still use Nightwind and PostCSS together please let us know...
Weird things can also happen if you are using your own dark:
class overrides because of this: https://github.com/jjranalli/nightwind/issues/71
I suspect when this is fixed then things will work a lot better.
@brutaldev thanks for your help
I tried everything I was able to do but no clue, it didn't worked.
my tailwind config file
and I added the purejavascript to the vite's index.html
the functions from the console returns undefined