Skip to content

feat: Add CommonJS (CJS) support via dual ESM/CJS build#9

Open
SwasthK wants to merge 1 commit into
superfly:mainfrom
SwasthK:feat/dual-esm-cjs-support
Open

feat: Add CommonJS (CJS) support via dual ESM/CJS build#9
SwasthK wants to merge 1 commit into
superfly:mainfrom
SwasthK:feat/dual-esm-cjs-support

Conversation

@SwasthK
Copy link
Copy Markdown

@SwasthK SwasthK commented Feb 16, 2026

Closes #8

Summary

Adds dual module support so @fly/sprites can be consumed in both:

  • ESM environments
  • CommonJS (CJS) environments (e.g., Nx/NestJS CJS builds)

Changes

  • Added CJS build via tsconfig.cjs.json
  • Generated dist/index.cjs
  • Set "main" to CJS entry
  • Kept ESM as default
  • Update gitignore to include dist-cjs
  • No additional dependencies introduced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support CommonJS consumers (CJS) — add dual ESM + CJS build

1 participant