A Rollup plugin that downloads HTTPS fonts referenced in CSS `url()` functions and copies them to a target directory, updating the URLs to relative paths. Current version 1.2.1, compatible with Rollup 3.0+ and Node.js LTS v16+. Unlike generic asset plugins, it specifically handles font downloading with optional download delays, include/exclude patterns, and automatic URL rewriting based on CSS bundle location. Does not clear the font directory between runs, only downloads missing fonts.
npm install rollup-plugin-bundle-fontsVerified import paths — ran on the pinned version, not inferred.
Basic Rollup config using bundleFonts plugin with required options fontTargetDir and cssBundleDir, plus optional delay.
Always provide both fontTargetDir and cssBundleDir options.
Manually delete the font directory between builds if you need fresh downloads.
To add 1 second delay, set delay to 1000000.
Run 'npm install rollup-plugin-bundle-fonts --save-dev' and ensure node_modules exists.
Use 'import bundleFonts from 'rollup-plugin-bundle-fonts'' (without curly braces).
No dependency data recorded yet.