Idea: Use Rollup instead of Parcel?
See original GitHub issueWhat is wrong?
Where does it happen?
How do we replicate the issue?
How important is this (1-5)?
Expected behavior (i.e. solution)
Other Comments
Rollup is a bundler not unlike Parcel, but much more powerful (IMO). It can generate ES6 Modules (for webpack & environments that support them) and UMD files (which work in browsers and Node.js require()
) with a single command.
So let’s say we generate brain.mjs
and brain.js
. After that, use the following in package.json
:
"main": "./dist/brain.js",
"browser": "./dist/brain.min.js",
"module": "./dist/brain.mjs"
Webpack, Rollup, and Parcel will automatically use brain.mjs
. Node.js will automatically use brain.js
(unless experimental modules is active). Web browsers can keep using brain.min.js
.
Rollup almost always produces smaller bundles than Webpack or Parcel. And bower could be removed.
I’m willing to work on porting to Rollup by myself; I just want to know if the maintainers are willing to use it.
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (7 by maintainers)
Top Results From Across the Web
Comparing bundlers: Webpack, Rollup & Parcel - Medium
Rollup has node polyfills for import/export, whereas webpack doesn't. Rollup has support for relative paths, whereas webpack does not, so we either use...
Read more >Rollup vs. Parcel vs. webpack: Which Is the Best Bundler?
While webpack has always been my standard choice, I decided to put it up against two other popular bundlers — Rollup and Parcel....
Read more >Benchmarking bundlers 2020: Rollup vs. Parcel vs. webpack
We've benchmarked Rollup, Parcel.js, and webpack across multiple ... ideas began to emerge about how to efficiently bundle our tons of JS.
Read more >Webpack, Rollup and Parcel Compared - YouTube
Let's build a React app using Webpack, Rollup and Parcel to compare these three bundlers.Code: https://github.com/jherr/bundler-comparisonIf ...
Read more >Module Bundlers Explained... Webpack, Rollup, Parcel, and ...
What is a Module Bundler? And why do I need one? Learn how tools like Webpack, Rollup, Parcel, and Snowpack can package your...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I do want to use some caution with regard to building node files. We are currently developing with node and there is something beautiful about changing tons of stuff, and clicking a play button and it just work.
There are, however, caution(s) to be had when working with transpilers such as GPU.js, or transpiler outputs, via babel, which are disgusting (yes, Babel guys, I hope you are reading), to other transpilers, like GPU.js, which are beautiful, (tl;dr shameless plug…
…but I’ve got the unit tests to prove it!
But, in their defense, we’re working with a subset of javascript rather than… ALL of it, but I will not take back the rant! end tl;dr)
…that turn javascript into GPU code. There are side effects at times, many of which are handled in GPU.js, BUT we can only go so far, as the garbage that most transpilers output simply violate the laws of all things sacred… and that can be detected and ran on the GPU.
That being said, although es6 is nice (specifically imports and exports) if that is all we’re (and we just removed them) working towards, I’m not sold, as it just waists time.
Our current build system needs to be evaluated as well, as there may be side effects with it, it is just that transpilers specifically, and specifically the ones in babel, are the ones that have given me the most trouble.
I actually made quite a bit a little while ago, but all the commits since then make it a little difficult to update and merge. I will try soon, if I have time.