mikevercoelen / icons-loader

Icons loader for webpack, generates iconfonts for webpack
https://www.npmjs.com/package/icons-loader
36 stars 9 forks source link

Error: Non-whitespace before first tag. #2

Closed DotCoyote closed 8 years ago

DotCoyote commented 8 years ago

Hi,

for every svg-icon i want to use, i get the following error log:

Listening at http://localhost:8080

webpack: wait until bundle finished: /__webpack_hmr
/src/node_modules/webpack-dev-middleware/middleware.js

:106
                        if(err) throw err;
                                ^

Error: Non-whitespace before first tag.
Line: 0
Column: 1
Char: m
    at error (/src/node_modules/sax/lib/sax.js:667:10)
    at strictFail (/src/node_modules/sax/lib/sax.js:69
3:7)
    at beginWhiteSpace (/src/node_modules/sax/lib/sax.
js:967:7)
    at Object.write (/src/node_modules/sax/lib/sax.js:
1019:11)
    at SAXStream.write (/src/node_modules/sax/lib/sax.
js:239:18)
    at PassThrough.ondata (/src/node_modules/readable-

After some research, this seems to be a problem with UTF8-Encoded SVGs. I'm not that into node-Modules, so could you provide a fix for this? Here is a possible solution

I use icons from iconmonstr.com, but even self-generated icons with Sketch or Illustrator doesn't work.

Thanks!

DotCoyote commented 8 years ago

Sorry, seems to be a known issue with saxjs :)

pulkitjalan commented 7 years ago

@CinKon did u ever find a workaround or a fix?

DotCoyote commented 7 years ago

Can't remember, sorry