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

feat(react): add support for rollup in bundles #5185

Conversation

joshblack
Copy link
Contributor

Add in support for creating ESM, CommonJS, and UMD bundles through a single rollup config. This change also keeps support for importing files directing to maintain backwards-compatibility. As a result, these changes generate (or maintain) the following bundles with rollup:

  • es/index.js
  • lib/index.js
  • umd/carbon-components-react.js
  • umd/carbon-components-react.min.js

Changelog

New

Changed

  • Update carbon-components-react to use rollup for bundling ESM, CommonJS, and UMD

Removed

@joshblack joshblack requested a review from a team as a code owner January 26, 2020 02:58
@ghost ghost requested review from abbeyhrt and tw15egan January 26, 2020 02:58
@joshblack
Copy link
Contributor Author

FYI @vpicone

@netlify
Copy link

netlify bot commented Jan 26, 2020

Deploy preview for the-carbon-components ready!

Built with commit 7c5c391

https://deploy-preview-5185--the-carbon-components.netlify.com

@netlify
Copy link

netlify bot commented Jan 26, 2020

Deploy preview for carbon-elements ready!

Built with commit 7c5c391

https://deploy-preview-5185--carbon-elements.netlify.com

@netlify
Copy link

netlify bot commented Jan 26, 2020

Deploy preview for carbon-components-react failed.

Built with commit 7c5c391

https://app.netlify.com/sites/carbon-components-react/deploys/5e3076cf41084a000cf089be

@vpicone
Copy link
Contributor

vpicone commented Jan 26, 2020

@joshblack nice! When messing around with typescript this seemed like a pretty necessary move.

@abbeyhrt
Copy link
Contributor

@joshblack Could you go over the rollup config stuff with me? Config files are a complete mystery to me

Copy link
Contributor

@abbeyhrt abbeyhrt left a comment

Choose a reason for hiding this comment

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

hey I noticed that the prop-types are still being included, is that supposed to happen?

@joshblack
Copy link
Contributor Author

@abbeyhrt updated! Thanks for the catch

Copy link
Member

@tw15egan tw15egan left a comment

Choose a reason for hiding this comment

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

👍 ✅

@joshblack joshblack merged commit 5408899 into carbon-design-system:master Jan 28, 2020
@joshblack joshblack deleted the feat/add-rollup-bundle-to-react branch January 28, 2020 18:22
This was referenced Feb 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants