Open nolde opened 3 years ago
This might be slightly on the side of personal preference, but here's my reason for not using runtime
: when building small libraries for the browser, importing a single tiny function from a 5mb dependency that can't be tree-shaken is not a good default. In general, Microbundle's Babel configuration avoids pulling in helpers wherever possible - this only tends to be an issue when Babel is reconfigured in more verbose (non-loose/strict) modes, which Microbundle isn't really designed for.
I'm sure I'm missing something with the tree-shaking, but when I've used babel runtime it outputs imports like import _extends from "@babel/runtime/helpers/extends";
- can't that be tree-shaken and bundled quite nicely?
In rollup's documentation, there the following excerpt:
I've noticed
microbundle
usesbundled
option... is there any way to change/configure this? And shouldmicrobundle
useruntime
by default, given that it focuses in library bundling?