{"library":"rollup-plugin-http-resolve","title":"rollup-plugin-http-resolve","description":"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.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install rollup-plugin-http-resolve"],"cli":null},"imports":["import { httpResolve } from 'rollup-plugin-http-resolve'","import type { HttpResolveOptions } from 'rollup-plugin-http-resolve'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { httpResolve } from 'rollup-plugin-http-resolve';\nimport { rollup } from 'rollup';\n\nasync function bundle() {\n  const bundle = await rollup({\n    input: 'https://example.com/module.js',\n    plugins: [\n      httpResolve({\n        cache: new Map(),\n        fallback(id) {\n          if (!id.startsWith('.')) {\n            return `https://esm.sh/${id}`;\n          }\n        }\n      })\n    ]\n  });\n  const { output } = await bundle.generate({ format: 'es' });\n  console.log(output[0].code);\n}\nbundle();","lang":"typescript","description":"Shows basic usage: resolve a remote HTTP import with optional cache and CDN fallback.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}