3 ms·
I've found rollup, https://rollupjs.org/ https://rollupjs.org/, to be really useful for this.
by johnhenry 10y ago
I've found rollup, https://rollupjs.org/ https://rollupjs.org/, to be really useful for this.
- jonahx 10y agoThis looks nice. Is it as battle-tested as browserify?
- sotojuan 10y agoIt's fairly new but The Guardian uses it for all their JavaScript (the creator works there).
- JasonSage 10y agotl;dr—don't use rollup with large untested dependencies I've had projects that got really strange error messages when using rollup that completely went away when I switched back to Babel. One "issue" with rollup is that it is not 100% semantically correct. Neither is Babel in all cases, but the creator argues that if you're not following exact semantics now, you're relying on your tests to ensure proper behavior, so use something that is at least more minimal and keeps your bundle size down. So when you're writing code and bundling with rollup, you can pretty much ensure everything works fine, but as soon as you pull in an extensive third-party library you have no assurances that it has been tested with rollup and will work correctly in all cases. In the worst case, it will seem to work fine but in weird situations will actually error out. This was my experience with rollup.
- JasonSage 10y agoI should clarify on my above comment, in rollup the semantics don't matter as much but if you're using Bublé instead of Babel, the semantics may very well come into play. In either case, I didn't have luck on a project until I moved fully to webpack+Babel.
- deleted 10y ago[deleted]