A Rollup plugin that generates a sprite sheet from a set of images using spritesmith and outputs corresponding SASS/LESS/Stylus/CSS mixins. Current stable version: 0.1.2. Infrequently updated; last commit 2019. Differentiates by integrating sprite generation into the Rollup build pipeline, automating the creation of CSS sprites and mixins directly from source images. Compared to standalone tools like grunt-sprite or gulp.spritesmith, this plugin offers seamless bundling with Rollup, reducing build configuration overhead.
npm install rollup-plugin-spriteNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic plugin configuration: source glob, target image and CSS paths, output directory, and spritesmith options.
Consider using alternative sprite plugins like 'rollup-plugin-sprite-svg' or update manually.
Ensure both use same interpolations (e.g., if target.image uses [hash], cssImageRef should too).
Install optional dependencies like 'canvas' if default image processing fails.
Update plugin or use Rollup v1.x or v3.x with compatibility wrapper.
Run 'npm install spritesmith' to install it as a direct dependency.
Use default import: import spritesmith from 'rollup-plugin-sprite'
Use Rollup v1.x or upgrade plugin.