-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Non-whitespace before first tag #84
Comments
this is raised by sax parser , the module analysing your svg. i encourage you to open your svg with a good text editor like notepad++, and activate option to see all invisible white chars. You'll be able to see incriminated char and shoot it. |
See, I don't think that's the case. The problem is that the parser is literally coming across this string: And fwiw I did save my files as UTF-8 encoding without BOM to eliminate that as the reason. |
ok so it pay comes from the order of your loaders for svg files. I have had this issue before. moreover do no not forget loaders are called in the inverse order of lines in your webpack.config file |
@nebaff that was the solution for me, I needed to move my |
Any chance you could post your code @nicgordon :)? |
this may be and old thread but I came across this same error, make sure you set a defined loader for the file. Especially if you have other loaders with svg definitions import Icon from '-!svg-react-loader./icon/path/name.svg'; |
I had this same issue but am using a root import plugin, so mine ended up looking like:
(note the 2nd bang '!' after '-svg-react-loader') |
Sorry to raise an issue with this name again, but I believe that this is not related to the BOM issue that was closed previously. I am wondering if I am doing something silly with my webpack config that is causing this:
So you'll notice the char it comes across is an 'm', so I decided to see what it was seeing and logged out before this line
svg-react-loader/lib/xml/parse.js:16:16
and got this:It seems that the loader has already done its magic by this point. So why am I getting this warning? Is it running twice? This is how my loader is configured:
Any help would be appreciated. Thanks!
The text was updated successfully, but these errors were encountered: