chore(cjs/ems): Re-add CJS for dual module support #1234
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is the purpose of this pull request?
What changes did you make? (provide an overview)
Re-add CJS support which dropped in v3.0.0-beta.10.
But ESM & CJS dual module support exists <= v3.0.0-beta.9.
Which issue (if any) does this pull request address?
#1226
#1230
Is there anything you'd like reviewers to know?
ESM & CJS dual module support exists in v3.0.0-beta.9.
As I'm a big fans of ESM, I understand CJS is dropped.
But I don't think it's time to drop CJS support.
PS: As may not re-add CJS, I use
esbuild
for easy mainteinance.node-fetch/package.json
Line 9 in 38839c5
node-fetch/package.json
Line 26 in 38839c5
node-fetch/rollup.config.js
Line 8 in 38839c5