$ gnpm install imagemin-svgo
SVGO imagemin plugin
$ npm install imagemin-svgo
import imagemin from 'imagemin';
import imageminSvgo from 'imagemin-svgo';
(async () => {
	await imagemin(['images/*.svg'], {
		destination: 'build/images',
		plugins: [
			imageminSvgo({
				plugins: [{
					name: 'removeViewBox',
					active: false
				}]
			})
		]
	});
	console.log('Images optimized');
})();
Returns a Promise<Buffer>.
Type: Object
Pass options to SVGO.
Type: Buffer
Buffer to optimize.
MIT © imagemin
Copyright 2013 - present © cnpmjs.org | Home |