lukeed/clsxPublic

A tiny (239B) utility for constructing `className` strings conditionally.

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

ST

stesvis opened 路

I am unable to use `clsx/lite`.

```json // package.json "clsx": "^2.1.0" ```

```js // MyComponent import { clsx } from "clsx/lite"; ```

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

What am i missing?

  1. DR

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

    ![image](https://github.com/lukeed/clsx/assets/8912561/3cb75b2f-56dc-4634-a395-ced59729cc34)

  2. DR

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

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

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

  3. droid51referenced this in Lite Version: Improve Typescript Definition and Support for "moduleResolution": "Node" #942 years ago on GitHub

  4. ID

    for me, just change moduleResolution in tsconfig.json fix.

    change moduleResolution: 'node' to moduleResolution: 'nodenext'

  5. DakshSinghDhamireferenced this in feat: add dedicated type declarations for clsx/lite #1264 months ago on GitHub

  6. 3ni8mareferenced this in fix: add typesVersions fallback for clsx/lite (fixes #92) #1272 months ago on GitHub