A Rollup plugin that accelerates builds by caching plugin transformations (e.g., @rollup/plugin-commonjs, @rollup/plugin-node-resolve, @rollup/plugin-babel) and prebuilding npm dependencies into separate bundles. Current stable version is 1.3.0, with irregular releases. Unlike Rollup's built-in in-memory cache, this persists to disk, speeding up initial builds and non-watch builds. Supports TypeScript types, ESM only, and requires a Redis backend.
npm install rollup-redis-cacheNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Configures Rollup with disk caching, plugin caching enabled automatically, and prebuilding lodash into a separate bundle.
Upgrade Rollup to version 2.0.0 or higher.
Replace 'import rollupCache from "rollup-cache"' with 'import { cacheBuild } from "rollup-cache"'.If you need caching for other plugins, open an issue or implement custom caching via wrapper.
Set output.format to 'es' in your rollup config and use <script type="module"> in HTML.
Install and run Redis, or use the Redis_HOST and Redis_PORT environment variables to point to an existing instance.
Always set 'enabled' in cacheConfig to avoid unintended cache disable in production.
Use import syntax or set "type": "module" in package.json.
Replace default import with: import { cacheBuild } from 'rollup-cache'Install and start Redis server, or set environment variables Redis_HOST and Redis_PORT.
Set output.format to 'es' in your rollup config.