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

Support for building CJS modules #5929

Closed
2 tasks done
atifsyedali opened this issue Oct 27, 2020 · 2 comments
Closed
2 tasks done

Support for building CJS modules #5929

atifsyedali opened this issue Oct 27, 2020 · 2 comments

Comments

@atifsyedali
Copy link

Checklist

Please mark these items with an [x]

  • I've already searched through existing tickets
  • Other people will find this feature useful

Feature Description

Please output two versions -- CJS and ESM -- in the shipped libraries and remove the type: module flag from package.json.

I don't think this is a breaking change as you are only adding a new output variant. Existing systems that rely on ESM will continue to work the same way.

Visual Mockups

None

@acerix acerix changed the title Support two dist variants: CJS and ESM Support for building CJS modules Nov 2, 2020
@arshaw arshaw added this to the next-release milestone Nov 5, 2020
@arshaw
Copy link
Member

arshaw commented Nov 5, 2020

this has been implemented in master. i'll write a comment here when i release

@arshaw arshaw closed this as completed Nov 5, 2020
@arshaw
Copy link
Member

arshaw commented Nov 12, 2020

There is now a commonjs file in each package, main.cjs.js and now it's hooked up to the main field in package.json whereas the esm file is the module field. As of 5.4.0

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

No branches or pull requests

3 participants