A Webpack plugin that saves compiled assets to Redis, supporting Webpack versions 2, 3, 4, and 5. Current stable version is 1.1.1, with low release cadence (last update in 2020). Key differentiators include full cross-version compatibility, customizable filtering and transformation of assets via callback functions, and TypeScript type definitions. Unlike similar plugins that only output to disk or cloud storage, this plugin enables real-time asset serving via Redis for use cases like distributed caching or dynamic asset updates.
npm install webpack-redis-pluginNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Configures webpack-redis-plugin to filter for non-empty JS assets and save their SHA1 hash to Redis.
Use environment variables and parser options like `process.env.REDIS_PASSWORD`.
Set `output.clean: true` in Webpack config or delete files via another plugin.
Consider using `ioredis` directly, or fork the plugin to replace the Redis client.
Wrap `filter` body in try/catch or ensure it handles errors gracefully.
Run `npm install --save-dev webpack-redis-plugin` and ensure correct require/import (see imports section).
Replace `const WebpackRedisPlugin = require('webpack-redis-plugin')` with `const { WebpackRedisPlugin } = require('webpack-redis-plugin')`.Start Redis server or update config: `new WebpackRedisPlugin({ config: { host: '127.0.0.1', port: 6379 } })`.