diff --git a/package.json b/package.json index 69954cb..f173559 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,13 @@ } } }, + "typesVersions": { + "*": { + "lite": [ + "./clsx.d.ts" + ] + } + }, "author": { "name": "Luke Edwards", "email": "luke.edwards05@gmail.com", diff --git a/readme.md b/readme.md index b1af2b3..b2c3f58 100644 --- a/readme.md +++ b/readme.md @@ -105,6 +105,11 @@ clsx({ foo: true }); //=> "" ``` +> **Note:** `clsx/lite` is exposed via the `exports` map. TypeScript projects +> using `moduleResolution: "node"` need the `typesVersions` fallback (shipped +> in this package) for types; for full `exports` support use +> `moduleResolution: "bundler"`, `"nodenext"`, or `"node16"+`. See #92. + ## Benchmarks For snapshots of cross-browser results, check out the [`bench`](bench) directory~!