📝 Documentation: Add FAQ entry about adding dual CJS/ESM output #942
Labels
area: documentation
Improvements or additions to docs
status: accepting prs
Please, send a pull request to resolve this!
Bug Report Checklist
main
branch of the repository.Overview
This template only has ESM output because that's the future, yippee, hooray. But some packages do need to have dual CJS/ESM output - e.g. packages such as https://github.com/JoshuaKGoldberg/ts-api-utils that needs to be run by ESLint rules (which must be in CJS right now).
It's not that much work to add dual CJS/ESM emit to a package. I don't want to add it to the template, but I do want to remember how to do it - and have a place to explain my & the package's reasoning. So I'll add an FAQ entry on all that.
https://github.com/JoshuaKGoldberg/ts-api-utils/blob/10e11dc288a50f695a882201462e67dc29ac2c93/tsup.config.ts#L7
https://github.com/JoshuaKGoldberg/ts-api-utils/blob/10e11dc288a50f695a882201462e67dc29ac2c93/package.json#L15
Additional Info
Shoutout to @atilafassina for prompting this by asking about it 😄
Note to self: I also thought
are-docs-informative
was dual-emit, since it's used in a lint rule. Looks like it might not be after migrating? Maybe I missed a line?The text was updated successfully, but these errors were encountered: