tailwind-variants icon indicating copy to clipboard operation
tailwind-variants copied to clipboard

TS error while defining global config

Open giladv opened this issue 5 months ago • 2 comments

Describe the bug While trying to setup a global config, a TS error thrown regarding the defaultConfig object

'defaultConfig' cannot be used as a value because it was exported using 'export type'.

To Reproduce

import { defaultConfig } from "tailwind-variants";

defaultConfig.twMergeConfig = {
  extend: {
    theme: {
      spacing: ["elem-md", "elem-lg"],
    },
  },
};
  • Version 3.1.1
  • TS version 5.7.2 but also on 5.9.2

giladv avatar Sep 13 '25 19:09 giladv

I'm also experiencing this. Did you find a workaround @giladv?

tct-willr avatar Oct 16 '25 21:10 tct-willr

@tct-willr just ts-ignore'd it for now..

giladv avatar Oct 18 '25 17:10 giladv

hey @jrgarciadev @wingkwong @Peterl561, is this project still being maintained? Would you be able to review a PR if someone put effort into opening one?

PaulRBerg avatar Nov 18 '25 16:11 PaulRBerg

Hey @PaulRBerg Thanks for checking in! Yep, it’s still maintained. I’ll take a look at the issue.

tianenpang avatar Nov 18 '25 16:11 tianenpang

Fixed: https://github.com/heroui-inc/tailwind-variants/pull/284 will be available on v3.1.0

jrgarciadev avatar Nov 22 '25 21:11 jrgarciadev