svg-sprite / grunt-svg-sprite

SVG sprites & stacks galore — Grunt plugin wrapping around svg-sprite that reads in a bunch of SVG files, optimizes them and creates SVG sprites and CSS resources in various flavours

Home Page:https://github.com/svg-sprite/svg-sprite

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

is xmlDeclaration working properly?

miguelmoraleda opened this issue · comments

Hey @jkphl ,

I'm trying to set xmlDeclaration to false, but it is not working for me. Is this feature working properly?

My config looks like this:

svg_sprite: {
    your_target: {
        expand: true,
        cwd: '<%= config.src %>/assets/svg/',
        src: ['**/*.svg'],
        dest: '<%= config.dev %>/images/',
        options: {
            mode: {
                defs: {         // Activate the «view» mode
                    bust: false,
                    css: true,
                    dest: ''
                }
            },
            transform: [
                {svgo: {
                    plugins: [
                        { removeViewBox: false }, 
                        { removeUselessStrokeAndFill: false }, 
                        { cleanupIDs: false }, 
                        { mergePaths: false }
                    ]
                }}
            ],
            svg: {
                namespaceIDs: false,
                xmlDeclaration: false
            }
        }
    }
}

Thanks in advance.

Best regards,

Miguel

Hey @miguelmoraleda,

you were right, thanks for that. Release v1.0.7 fixes this and improves XML & DOCTYPE declaration handling in general. Please let me know if you've still got problems.

Cheers,
Joschi

Hey @jkphl,

Thank you!! It is working properly 👍

Best regards,

Miguel