Yesterday the aforementioned Pika announced some new things. One of the things that stood out is Pika CDN:
The Pika CDN was built to serve the 60,000+ npm packages written in ES Module (ESM) syntax. This module syntax runs natively in the browser, so you can build for the web without a bundler.
With our CDN, package authors can distribute more modern, unminified packages without worrying about how to serve them directly. Instead, our nifty package-builder automatically resolves each package — and any legacy sub-dependencies — into a single, minified, ready-to-import JavaScript file.
Nice! Do note that versioning is limited:
We even intentionally limit semver matching to a certain major-only format (for all >1.0 packages) to minimize the URL surface and encourage good caching.
— Pika 📦 (@pikapkg) June 12, 2019
🤔 I do wonder if something like Subresource Integrity will land for ES Modules … and oh, don’t we need to self-host our assets? Computering is hard, ugh! #nuance
Related: The previously mentioned create-es-react-app
also touches directly importing ES Modules
Leave a comment