I'm ready to call it: Rollup is the web application bundler for the future. The work @Rich_Harris and @guybedford have done is amazing.
Forget this zero config crap: how about first-class ESM in browser, but with stuff like npm and non-relative paths actually working.
-
Show this thread
-
Correction: ESM in the browser, but also with automatically de-duped bundling, just in case http/2 isn't a panacea for you, either. And the same first-class tree shaking Rollup has always supported, naturally.
2 replies 0 retweets 9 likesShow this thread -
And no runtime overhead! You're actually using the browser's native import() and import to load what you need at runtime.
1 reply 0 retweets 8 likesShow this thread -
Oh you need to support browsers like IE and Edge that don't have import() yet? Well just tell Rollup to also spit out a SystemJS version of your bundles, and load one or the other at runtime. Did I mention either will support *truly dynamic* imports: import(x);
1 reply 0 retweets 4 likesShow this thread -
For months I've been brushing off ESM in the browser as a pipe dream that would never work. My problem was being too myopic to see that a build step would fix all of its shortfalls. Rollup is that build step.
2 replies 1 retweet 11 likesShow this thread -
Adam Rackis Retweeted Yehuda Katz 🥨
/cc
@wycats ESM can absolutely work at runtime; it's not just for authoring—so long as you have the right build stephttps://twitter.com/wycats/status/931705425728172032 …Adam Rackis added,
Yehuda Katz 🥨Verified account @wycatsI'm ready to call it: ES2015 modules are way more useful as an authoring format than as a browser runtime feature. Expect tools that "statically link" modules into one script/module to be best practice for a long time. But it's great that we standardized the authoring format!1 reply 1 retweet 6 likesShow this thread -
Replying to @AdamRackis
You're not disagreeing with my original tweet right?
1 reply 0 retweets 1 like -
Replying to @wycats
I think I am. Was your original tweet assuming ESM would always be transformed to a pre-ES6 format? Or were you smart enough to anticipate a tool like Rollup which takes ESM as input, and emits more useful, performant ESM?
2 replies 0 retweets 1 like -
Replying to @AdamRackis
I did say one script/module ;) Yes, I anticipated rollup eventually turning a bunch of modules into a smaller group of modules based upon privacy needs. I think modules in the runtimes will be useful for now as very souped up scripts and for wasm interop.
2 replies 0 retweets 1 like -
Replying to @wycats
Then never mind, your tweet was more forward thinking than I was capable of seeing! Dilly Dilly!
1 reply 0 retweets 1 like
My tweets are usually breadcrumbs for the future 
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.