DEV Community

loading...

Discussion on: Write a library using TypeScript library starter

Collapse
jmourtada profile image
Jonathan Mourtada

Good write up and a nice starter kit. Just of curiosity did you choose Rollup over Webpack? If so, what are you thought about Rollup vs Webpack?

Collapse
alexjoverm profile image
Alex Jover Author

I switched at some point, see the Twitter thread and an article showing both pros

In short, I don't say one is better than another:

Rollup:

  • Very simple
  • A bit more efficient
  • Scope hoisting (although Webpack 3 has it already)
  • It does what it does, nothing else
  • Bottom line: perfect for libs or very small projects

Webpack:

  • Great community
  • Does really a lot of stuff (assets management, support all filetypes, code splitting...)
  • Scales very well as project grows
  • A bit complex (perhaps the new cli helps about it)
  • Bottom line: perfect for any app/project, specially medium/big