-
Notifications
You must be signed in to change notification settings - Fork 82
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
svg-react-loader with create-react-app - how to setup? #86
Comments
I managed to solve this, using a simple fix in this post Basically, just add a For example this:
Would become this:
Works for me now - no more whitespace issue. I should mention I didn't need to eject either, with this approach. |
Thank u so much for that little text ↑, it worked for me either without of ejecting ttg. Worked as charm. |
The
Any known workaround? |
@pauldcollins you are the svg life saver ! |
I am getting the non-whitespace error when importing my SVG file with
create-react-app
Module build failed: Error: Non-whitespace before first tag.
I've ejected my app and am trying to modify the
webpack.dev.config
file to ignore running the standard file-loader on my svg files and run thesvg-react-loader
instead.I found some code from this post and changed my filename to end in
inline.svg
, but trying to configure my webpack config doesn't seem to be working.Here's my webpack config code:
I'm still getting the same whitespace error though. Thanks for any help.
The text was updated successfully, but these errors were encountered: