removeDoctype Option does not seem to work
janwidmer opened this issue · 2 comments
janwidmer commented
Hi There,
Thanks for the great plugin. I tried to set to "removeDoctype" option because I am using the generated svg as inline svg sprites, but when I set that option, it still adds the doctype to the generated svg.
My Configuration:
const path = require('path');
module.exports = (gulp, plugins) => {
return () => {
return gulp
.src('assets/icons/*.svg')
.pipe(plugins.svgmin(function (file) {
var prefix = path.basename(file.relative, path.extname(file.relative));
return {
plugins: [
{
removeDoctype: true
}, {
cleanupIDs: {
prefix: prefix + '-',
minify: true
}
}
]
}
}))
.pipe(plugins.svgstore())
.pipe(gulp.dest('views/_partials'));
};
};
Am I doing something wrong?
Thanks and regards best
Jan
ben-eb commented
Hi @janwidmer,
It's on by default; is the problem coming from svgstore? If you don't want a doctype in that final SVG you'll have to specify {inlineSvg: true}
as the options to svgstore.