nextui-org / tailwind-variants

🦄 Tailwindcss first-class variant API
https://tailwind-variants.org
MIT License
2.42k stars 70 forks source link

Non-client code included into bundle: `__dirname` is not defined #218

Open kpyszkowski opened 1 month ago

kpyszkowski commented 1 month ago

Describe the bug There is an error in the console saying the __dirname variable is not defined. The code that uses __dirname variable is included both in development and production build and only when the Tailwind config is wrapped with withTV transformer.

To reproduce Steps to reproduce the behavior:

  1. Wrap Tailwind config with withTV transformer
  2. Start the application and open browser console
  3. See error

Expected behavior The code is not included into client bundle.

Screenshots

image

Desktop

Additional context NextJS 14.2.14