A Rollup plugin that converts bare Node-style imports into pinned URLs from skypack.dev CDN, enabling browser-friendly ESM imports from npm packages. Version 1.1.2 is stable and actively maintained. It supports options for minified vs. normal builds, pinned URLs for production, custom replacement logic, and handling of relative/web imports. Key differentiator: lightweight, focused alternative to other CDN plugin approaches; based on skypin library.
npm install rollup-plugin-skypinNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Showcases a Rollup configuration using the skypin plugin with options: minified, pinned URL, and custom replacement logic.
Ensure Rollup >= 1.0.0 is installed.
Return false to keep original behavior, or a CDN-ready URL string to replace entirely.
Set relative_external: true if you have local files; false only if all imports are npm packages.
Explicitly set minified: true to preserve current behavior.
Add builtins to rollup external config or use @rollup/plugin-node-resolve with preferBuiltins: false.
npm install skypin --save-dev
Use named import: import { skypin } from 'rollup-plugin-skypin'In shouldReplace, check if id is an npm package name and return false for local/built-in modules.
Ensure Rollup config uses format 'esm' or use rollup-plugin-skypin in a .mjs config file.