lukeed / clsx

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

add conditional exports #63

Closed cometkim closed 1 year ago

remcohaszing commented 1 year ago

This PR breaks native ESM (.mjs extension is necessary) and TypeScript (CJS interface does not match ESM interface, although this was already broken) support. Also there there should be a "default" field, which should be the last key in the export map. Since this package doesn’t specify "type": "module", the file to resolve for require should he marked as "default".

I proposed a proper fix in #57, but the author has shown no interest to resolve this issue. This does not include exports for package.json as you added here.