Skip to content

v127

Compare
Choose a tag to compare
@ije ije released this 02 Jul 17:10
· 742 commits to main since this release

In v127, we improved the network waterfall by adding the dependency imports of current module in the entry module (aka. preload).

For example: https://esm.sh/[email protected]

import "https://esm.sh/stable/[email protected]/es2022/react.mjs";       /* Added in v127 */
import "https://esm.sh/v127/[email protected]/es2022/scheduler.mjs"; /* Added in v127 */
export * from "https://esm.sh/v127/[email protected]/es2022/react-dom.mjs";
export { default } from "https://esm.sh/v127/[email protected]/es2022/react-dom.mjs";

For framework authors, esm.sh provides an extra X-Esm-Deps header that allows you to get those preload import urls.

const res = await fetch("https://esm.sh/[email protected]")
console.log(res.headers.get(`X-Esm-Deps`)?.split(", "))

Changelog:

  • Add preload imports
  • Add modern-normalize to the cssPackages
  • Fix subpath not be resovled with ?alias (close #671)
  • Fix dts transformer for "*.d" path imports (close #660)
  • Fix source map mappings (close #668)
  • CLI: Fix update failure caused by gh module (#661 by @lifegpc)
  • Upgrade esbuild to 0.18.10