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

added cjs distribution command and tsconfig #45

Merged

Conversation

heyAyushh
Copy link
Contributor

@heyAyushh heyAyushh commented Aug 28, 2024

Problem

  • current package only supports ECMAScript Modules (ESM).
  • devs relying on CommonJS (CJS) cannot utilize the package.
  • limits compatibility with various Node.js environments and tools.

Changes

  • Added CJS distribution to the existing ESM-only package.
  • existing ESM functionality is there.
  • improved overall package accessibility and usability.

@mikemaccana
Copy link
Contributor

@heyAyushh - great work - I love that this still uses tsc, I don't want to have to deal with anothertsup-like system that is complex and has many failure modes again.

"files": [
"dist"
],
"sideEffects": false,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@mikemaccana mikemaccana Aug 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From Ayush: https://github.com/webpack/webpack/blob/main/examples/side-effects/README.md - helps webpack users to bundlethis more efficiently.

@mikemaccana mikemaccana merged commit f538c51 into solana-developers:main Aug 29, 2024
1 check passed
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.

2 participants