Rollup plugin that resolves import specifiers as URLs, allowing you to fetch dependencies directly from CDNs (e.g., unpkg, jsdelivr) or local files instead of using npm/yarn. Version 0.2.0 is the latest stable release. It supports https, http, file, and data URL protocols. Designed as an alternative to rollup-plugin-node-resolve for URL-based imports. No breaking changes or significant release cadence; the package is minimal and stable. Options are passed through to make-fetch-happen for HTTP caching, retries, and proxy support. Works alongside rollup-plugin-commonjs for CommonJS URLs. Essential for projects that want to avoid a full install step.
npm install rollup-plugin-url-resolveVerified import paths — ran on the pinned version, not inferred.
Configures Rollup to use URL-based imports from unpkg with caching and CommonJS support for non-module URLs.
Add commonjs include for the URL domain; see docs for example.
Use @rollup/plugin-node-resolve if you need to resolve local node_modules packages.
Set cacheManager to a path like '.cache' and add to .gitignore.
Change import to a full URL, e.g., 'https://unpkg.com/foo?module'.
Add commonjs plugin with include pattern for the URL domain.
Check internet connection, or use a different CDN like cdn.jsdelivr.net.