A Rollup plugin that resolves imports via HTTP(S) URLs, enabling bundling of code from CDNs like esm.sh or unpkg. Current version 4.0.1-alpha.0 has irregular release cadence (last release ~2022). Key differentiator: it allows Rollup to fetch and bundle dependencies directly from HTTP sources, with optional caching and fallback to CDN resolution. Requires Node.js 14+. Written in TypeScript with built-in types.
npm install rollup-plugin-http-resolveNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic usage: resolve a remote HTTP import with optional cache and CDN fallback.
Ensure Rollup version is >=2.0 and <4.0.0, or test with Rollup 3.x.
Use 3.x stable versions if available, or pin to known working alpha.
Use dynamic import() or convert project to ESM.
Provide a cache Map in options to avoid redundant fetches.
Use dynamic import: const { httpResolve } = await import('rollup-plugin-http-resolve');Use named import: import { httpResolve } from 'rollup-plugin-http-resolve';