#52·cv

A redundant clsx dependecy

Author: VladimirCreatorCreated Jan 18, 2024Updated Jan 18, 2024

A redundant clsx dependecy

class-variance-authority actually already provides the functionality that clsx does and it is called cx.

cx is just an alias for clsx so I suggest removing clsx from package.json.

/src/lib.utils.ts

typescript
import { clsx } from 'clsx'
import type { ClassValue } from 'clsx'

is the same as

typescript
import { cx } from 'class-variance-authority'
import type { ClassValue } from 'class-variance-authority/types'