lukeed/clsxPublic

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

fix: fix esm support and types

The non-standard `package.json` field `module` was used. This pointed to
a faux ESM file (Uses ESM syntax, but has a `.js` file extension in a
package which doesn’t specify `"type": "module"`.

ESM support was fixed by using the `.mjs` file extension for the ESM
export and defining a proper `exports` field in `package.json.

The types reflected a package that has the `module.exports.default`
field. This was incorrect. The CommonJS types have now been fixed to use
`export =`, which is the correct way to type modules that use
`module.exports` assignments.

Additional types were added for ESM support.
RHRemco Haszing authored
40a074ePatch
Parent6da37d6
3 files changed+26-6
StackedSplit
clsx.d.mts+6 −0
clsx.d.ts+9 −5
package.json+11 −1