cascornelissen / svg-spritemap-webpack-plugin

SVG spritemap plugin for webpack
MIT License
207 stars 50 forks source link

Error: CSS minification error: postcss-svgo: Error in parsing SVG: Unbound namespace prefix: "xlink" #130

Closed cahyowhy closed 3 years ago

cahyowhy commented 3 years ago

got an error CSS minification error: postcss-svgo: Error in parsing SVG: Unbound namespace prefix: "xlink" while running npm run build. But on dev it seems fine.. this is my configuration

new SVGSpritemapPlugin('public/assets/img/sprite-icon-svg/**/*.svg', {
                    output: {
                        filename: 'assets/img/sprite-icon-svg.svg',
                        svg4everybody: true,
                        svgo: true
                    },
                    sprite: {
                        gutter: 5,
                        generate: {
                            title: false
                        }
                    },
                    styles: {
                        filename: 'src/assets/sass/_sprite-icon-svg.scss'
                    }
                })

btw i use this version.. "svg-spritemap-webpack-plugin": "3.7.1", this is my node version v10.16.3

thanks..

cascornelissen commented 3 years ago

Can you test if this happens with specific icons by only letting the plugin generate a spritemap for a single icon file? If you've found one, could you include it in this issue?

cascornelissen commented 3 years ago

Also, you might want to set the styles.keepAttributes option to true. I'm pretty sure that should solve it either way.

cahyowhy commented 3 years ago

thanks for replying.. i thinks this is related to cssnano. gonna close this