0.0.1 • Published 5 years ago
demo-react-js v0.0.1
example-rollup-react-component-npm-package
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
webpackis generally a better fit for applications, androllupis 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
- Use
babel - Use
semantic-release - Use
sass - Support
umdandesmodules - Use
storybook - Make the exported components really simple
My general thoughts
- Seemed pretty easy to get started with
rollup- There are a lot of plugins 2
- Pretty easy to specify output types (
umdandes, for example) - Some
rollupplugins didn't really play nicely withbabel@7- which is why I downgraded to6(I could definitely be messing something up)
- Not an easy way to plug
storybookin- It's weird and feels kind've gross because
storybookis usingwebpackto build 😬
- It's weird and feels kind've gross because
- Articles that were helpful
Footnotes
0.0.1
5 years ago
0.0.0-development
5 years ago