Closed shellscape closed 9 months ago
Hi @shellscape,
for context : https://github.com/csstools/postcss-plugins/issues/1031#issuecomment-1848977339
Is this something that worked before and is giving an error now or is this a new feature request?
types is omitted for the CJS/require export. Thats incorrect,
We do not have types for CJS
, so omitting them is actually correct.
First time that I've used the plugin, so it's a new issue for me. FWIW if generating types is painful, take a look at tsup which has no issue generating types for both ES and CJS. (I use that with jsx-email successfully and happens to be the project that I'm using this plugin in)
On tsup
: https://github.com/csstools/postcss-plugins/issues/1031#issuecomment-1802282616
Going forward we will slowly but surely start moving to pure es modules. So we will also favor es modules for things like types.
I will not personally spend further time on trying to get working types for cjs
, but contributions are welcome if they are realistic and do not ignore the issues as explained in https://github.com/csstools/postcss-plugins/issues/1031#issuecomment-1848977339
Hang on a sec - the tool looks a bit scary so it wasn't evaluated, and was dismissed as not an option? From one maintainer to another; that's a terrible signal to users and contributors alike.
Any serious effort that solves all issues in a way that is maintainable long term is more than welcome.
I have serious concerns about tsup
but I am happy to revisit this.
If tsup
can provide a solution for cjs
, then that is is fine :)
I am not going to stick to past judgements. And I will not reject a contribution purely because I didn't like a particular option at a point in time.
Closing this as we will not proactively work on this.
Happy to re-open if someone is willing to volunteer their time.
As can be seen here: https://github.com/csstools/postcss-plugins/blob/d964fa87f53b9a6b57f2420989682c24546f43d1/plugins/postcss-color-functional-notation/package.json#L30
types
is omitted for the CJS/require export. Thats incorrect, and as a result any project importing the package results in TS not being able to resolve the types.