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

Re-add support for cjs #197

Merged
merged 1 commit into from
Feb 18, 2025
Merged

Re-add support for cjs #197

merged 1 commit into from
Feb 18, 2025

Conversation

tstirrat15
Copy link
Contributor

Fixes #196

Description

NestJS just straight-up doesn't support ESM: nestjs/nest#8736

We've got some users who are using Nest and this is a stumbling point for them. Adding a CJS export isn't super costly for us (other than increasing the size of the bundle by a bit). We can revisit dropping this at some point in the future if desired.

Changes

  • Add postbuild that uses rollup to generate a CJS output
  • Add package.json fields that reference the CJS output

Testing

Review. Release this as a point release and notify users. See if it works with nest.

@tstirrat15 tstirrat15 requested a review from a team as a code owner February 18, 2025 18:04
@tstirrat15 tstirrat15 merged commit 05750cc into main Feb 18, 2025
11 checks passed
@tstirrat15 tstirrat15 deleted the re-add-support-for-cjs branch February 18, 2025 18:35
@github-actions github-actions bot locked and limited conversation to collaborators Feb 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

import Package is not available in all CommonJS modules
2 participants