lukeed / clsx

A tiny (239B) utility for constructing `className` strings conditionally.
MIT License
8.08k stars 141 forks source link

Cannot find module 'clsx/lite' or its corresponding type declarations #92

Open stesvis opened 5 months ago

stesvis commented 5 months ago

I am unable to use clsx/lite.

// package.json
"clsx": "^2.1.0"
// MyComponent
import { clsx } from "clsx/lite";

Error:

Cannot find module 'clsx/lite' or its corresponding type declarations.

What am i missing?

crazyx13th commented 5 months ago

wanna change from cnbuilder to "clsx/lite"... same problem?!

image

crazyx13th commented 5 months ago

ah ok... typescript moduleResolution "bundler"is a new magic (?) :-)

https://www.typescriptlang.org/tsconfig#moduleResolution

see also: https://github.com/lukeed/clsx/issues/89