Skip to content

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

3 participants