Registry / devops / builder-svg-minifier

builder-svg-minifier

JSON →
library0.0.1jsnpmunverified

Plugin for component-builder2 that optimizes SVG files using SVGO. Version 0.0.1 is the latest. Minimal release cadence; last published in 2014. Provides a simple .use() integration for SVG minification in the component-builder pipeline. Differentiator: specifically for component-builder2 ecosystem; standalone SVGO or other tools may be more flexible for modern workflows.

npm install builder-svg-minifier
INSTALL
IMPORT
SIG · BUILDER-SVG-MINIFI
B
builder-svg-minifier
devopsjavascriptv0.0.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

svg
var svg = require('builder-svg-minifier')
import svg from 'builder-svg-minifier'
Package uses CommonJS; no ESM exports available. Use require().
default
var svg = require('builder-svg-minifier')
var svg = require('builder-svg-minifier').default
Exports a function directly, not a module with default export.
options
var opts = {}; svg(opts)
svg(opts) without requiring
Options object is passed to SVGO; see svgo documentation for available options.

Shows how to use builder-svg-minifier as a plugin in component-builder2 pipeline with custom SVGO options.

var builder = require('component-builder'); var svg = require('builder-svg-minifier'); var opts = { plugins: [ { removeDoctype: true }, { removeComments: true }, { cleanupAttrs: true }, { removeMetadata: true }, ] }; builder.scripts(tree, options) .use('templates', svg(opts)) .pipe(process.stdout);
Debug
Known issues
deprecatedPackage is deprecated; component-builder2 is no longer actively maintained.
fix
Migrate to a modern build tool (e.g., Webpack, Rollup) and use svgo directly.
affects: all
gotchaRequires svgo as a transitive dependency; version mismatch may cause issues.
fix
Pin svgo version if needed; check svgo compatibility.
affects: >=0.0.0
breakingOnly works with component-builder2 (builder2.js); not compatible with builder v1.
fix
Use only with component-builder2.
affects: all
gotchaNo TypeScript definitions; may cause type errors in TS projects.
fix
Create custom type declaration or use @ts-ignore.
affects: all
Errors
Common errors & fixes
Cannot find module 'builder-svg-minifier'
Package not installed; missing from node_modules.
fix
Run 'npm install builder-svg-minifier'
Error: Cannot find module 'svgo'
svgo not installed as dependency; builder-svg-minifier expects it as peer/transitive.
fix
Run 'npm install svgo'
Upgrade
Version history
0.0.1latest on npm
Audit
Dependencies
component-builder2requiredpeer dependency; plugin is designed to be used with component-builder2
svgorequiredruntime dependency; provides SVG optimization logic
Agent activity
4 hits · last 30 days
node
4
Resources
builder-svg-minifier — npm install builder-svg-minifier · libregistry