Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📝 Documentation: Add FAQ entry about adding dual CJS/ESM output #942

Closed
2 tasks done
JoshuaKGoldberg opened this issue Oct 6, 2023 · 1 comment · Fixed by #986
Closed
2 tasks done

📝 Documentation: Add FAQ entry about adding dual CJS/ESM output #942

JoshuaKGoldberg opened this issue Oct 6, 2023 · 1 comment · Fixed by #986
Assignees
Labels
area: documentation Improvements or additions to docs status: accepting prs Please, send a pull request to resolve this!

Comments

@JoshuaKGoldberg
Copy link
Owner

Bug Report Checklist

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?

@JoshuaKGoldberg JoshuaKGoldberg added area: documentation Improvements or additions to docs status: accepting prs Please, send a pull request to resolve this! labels Oct 6, 2023
@JoshuaKGoldberg JoshuaKGoldberg self-assigned this Oct 6, 2023
JoshuaKGoldberg added a commit that referenced this issue Oct 26, 2023
## PR Checklist

- [x] Addresses an existing open issue: fixes #942
- [x] That issue was marked as [`status: accepting
prs`](https://github.com/JoshuaKGoldberg/create-typescript-app/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22)
- [x] Steps in
[CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/create-typescript-app/blob/main/.github/CONTRIBUTING.md)
were taken

## Overview

I'm a little pleasantly surprised to remember that it's only two
steps...!
@github-actions
Copy link

🎉 This is included in version v1.40.0 🎉

The release is available on:

Cheers! 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: documentation Improvements or additions to docs status: accepting prs Please, send a pull request to resolve this!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant