An esbuild plugin to cache HTTP/HTTPS imports, enabling bundling of URLs from CDNs like Skypack without npm install or node_modules. Current stable version 0.2.10, released irregularly. Supports import-maps and Deno-style caching (DENO_DIR). Differentiates from Snowpack's Streaming NPM Imports by integrating directly with esbuild, and works in both Node.js and Deno.
npm install esbuild-plugin-cacheNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Bundles a JavaScript module that imports from a Skypack URL, using an import-map and custom cache directory.
Set directory option or ensure DENO_DIR environment variable points to a writable path.
Use import syntax or ensure project is configured for ESM.
Upgrade to >=0.2.1 and use the importmap option as shown in README.
Use absolute paths if needed.
Manually clear the cache directory to force re-fetch.
Run 'npm install esbuild-plugin-cache' or 'deno add esbuild-plugin-cache'.
Use 'import { cache } from "esbuild-plugin-cache"'.Call cache() with or without options: cache() or cache({}) or cache({importmap, directory}).