The problem arose because I was using the latest stable version of DaisyUI, which seemed to have compatibility issues with my current setup means tailwind v4 .
I found that the beta version of DaisyUI had a fix for this issue. Here are the steps to resolve it.
npm i -D daisyui@beta
in css file
@import "tailwindcss";
@plugin "daisyui";
and in vite.config.js
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import tailwindcss from '@tailwindcss/vite'
// https://vite.dev/config/
export default defineConfig({
plugins: [react() , tailwindcss()],
})
this configuration is work for me.
there is no need to configure tailwind.config.js