there's an entire section of the article on performance that you should really read, but the tl;dr is that HTTP/2 makes @pika/web's per-dependency bundling viable and even preferred compared to the default, single vendor.js bundle.
✅ Exactly! @pika/web uses bundles internally on the dependencies themselves so that you get web-native npm packages... which was the main reason that many of us started using Webpack in the first place!
Hides bundling in a different place and you lose all the smaller dev nuances most ask for. (Forcing web_modules folder, full path extensions, etc)
But competition breeds innovation. Am excited to see how pieka does!!
Running `npx @pika/web` gets you a web_modules/ directory with each package installed as a single JavaScript file. This preserves the original interface of the package while fixing any issues that may have occurred had you tried to import the file directly from npm/unpkg.
@pika/web is an attempt to solve that original problem: how can we use modern npm packages on the web?
It turns out that thanks to ESM syntax, packages can be installed in a way that lets you skip the bundler altogether for your application.
github.com/pikapkg/web
Not only that, but web applications have become more complex as a result. Create React App, for example, installs a complex 200.9MB node_modules/ directory of 1,300+ different dependencies just to run ”Hello World!”
While this has led to some incredibly powerful tooling, it has also introduced a ton of complexity to a field that has always taken pride in its view-source, easy-to-get-started ethos.
#JSKongress how webpack works! Great talk by @TheLarkInn (I don’t know how that extra slide got in there...) kidding, actually really clearly explained the architecture.
## Why We Bundle
JavaScript bundling morphed from being a production-only optimization to an absolute dev requirement for one big reason: npm. Browserify (and later Webpack, Parcel, etc.) all allowed you to run npm packages in the browser.
The fact that Microbundle is trusted by thousands of OSS projects is humbling.
If you chose Microbundle for your library, I firmly believe you'll find the next few months prove that to be a very wise decision.
I'll get back to building. 🛠
Instead of trying to wire up everything myself I just used @pikapkg this time to bundle and publish my new package. If you are looking for something that just works I highly recommend trying it out too 😌
We support a compromise: your top-level project package.json is able to contain comments, but then comments are stripped on publish so that you never need to worry about comments in installed package manifests.