Back to directory
jaebradley avatar

example-rollup-react-component-npm-package

Example React Component, Published to npm. Read more below about its uses, features, and usage.

Clone repository

git clone https://github.com/jaebradley/example-rollup-react-component-npm-package.git

177

Stars

23

Forks

4

Watchers

MIT

License

example-rollup-react-component-npm-package

Greenkeeper badge Example Rollup React Component NPM Package codecov npm npm

Example React component "library" using rollup that is published to npm.

rollup and webpack

There are a lot of articles that compare rollup and webpack (like this or this or this or this).

The general point is

webpack is generally a better fit for applications, and rollup is generally a better fit for libraries 1

So what is this project?

I've never used rollup before - hell, I've barely used webpack before.

This was mostly to see how easy / difficult it was to create a React component package using rollup (aka "proof-of-concept").

My requirements for this package were

  1. Use babel
  2. Use semantic-release
  3. Use sass
  4. Support umd and es modules
  5. Use storybook
  6. Make the exported components really simple

My general thoughts

Footnotes

Releases

2.0.18 (2022-04-21) Bug Fixes

upgrade @babel/runtime from 7.17.0 to 7.17.8 (#132) (78b83ea)

2.0.17 (2022-04-17) Bug Fixes

upgrade @babel/runtime from 7.16.7 to 7.17.0 (#131) (193aebf)

2.0.16 (2022-02-07) Bug Fixes

upgrade @babel/runtime from 7.16.5 to 7.16.7 (#129) (029531d)

2.0.15 (2022-01-15) Bug Fixes

upgrade @babel/runtime from 7.16.3 to 7.16.5 (#128) (f0f96d1)

2.0.14 (2022-01-13) Bug Fixes

upgrade @babel/runtime from 7.16.0 to 7.16.3 (#126) (63d0f82)