New Website, Improved API, and ESM Support
It's been a while since our last update, but don't worry - we've been hard at work! Check out the summary of updates we're launching!
ESM - ES Modules Support
Since launching the support for ESM about two years ago, we've been working on improving the compatibility with the existing packages, as well as the bundling performance. The improvements done over the past year include:
- Support for the
exportsfield, which allows package authors to configure which files will be served by the CDN by default.
- Support for the
importsfield, which can be used to load different internal files based on the environment.
- Support for the
browserfield, which allows substituting certain files for browser bundling or entirely excluding them.
- Support for converting existing CJS modules to ESM.
- Automated polyfilling of the supported node.js modules and globals.
- Major performance improvements for large packages.
- Various other smaller compatibility improvements.
Our current ESM bundling mode aims to strike a balance between the loading performance (the number of requests, amount of loaded data, and caching) and compatibility with most of the existing packages.
We're looking to further improve the compatibility with packages that can't be easily bundled or require custom configurations. If you are interested in more technical details, check out the related GitHub issue.
Our data API has received a major overhaul recently, including:
- A new "entry points" feature, which analyzes static package metadata, as well as its actual usage, and suggests the correct files to use for each package.
- New network stats endpoints, which provide network-wide information about jsDelivr usage.
- New browser and platform stats endpoints, which give insight into the current trends in the browser and operating system usage.
- New proxy stats endpoints, which provide usage stats for projects using our custom CDN endpoints.
- Support for retrieving historical statistics data and comparing different periods,
- Improved package statistics with bandwidth data.
- An OpenAPI document file, which documents the whole API in a standardized, machine-readable way.
- A new interactive developer portal based on the OpenAPI document with detailed information for each endpoint and the ability to make real requests.
All API changes are fully backward compatible. If you use an endpoint that has been deprecated, you'll now see a
Deprecation header in the response, as well as a
Link header pointing to the new endpoint. All deprecated endpoints will continue to work, but their new versions may provide additional features or improved data formats.
Our website has been redesigned to better showcase the new ESM and API features and overall improve the user experience:
- The home page got dedicated sections for ESM, the API, and our custom CDN endpoints, and shows more of our usage stats.
- The project pages were extended with:
- an "install" section, which makes use of the automated entry points detection,
- README files, which show documentation directly on our website,
- an inline search widget, which allows search for the next package without going back to the home page,
- more package usage stats.
- Package search now allows filtering for specific file types (ESM/JS/CSS) and includes monthly downloads directly in the results.
- The new About Us page explains who we are and what we do, with the History page documenting the most interesting steps of our journey.
- The new Purge Tool provides a GUI way of purging our cache.
Additionally, we're happy to re-launch the new Statistics page, which uses the new API features to provide a nice summary of our CDN usage. You can learn which CDN providers we use and where, see the popularity of different browsers and operating systems, and explore the most popular projects. These statistics are based on fully anonymous, highly aggregated access data.
Stay tuned and follow us on Twitter @jsDelivr!