Skip to content
This repository has been archived by the owner on Jun 5, 2022. It is now read-only.

Importing UploadIcon.svg as Component #23

Merged
merged 1 commit into from
Apr 7, 2018

Conversation

joshuaai
Copy link
Contributor

@joshuaai joshuaai commented Mar 31, 2018

This keeps the original SVG file rather than inlining it as in #22.
The image is passed instead as a the src property to the <img /> tag.
This fixes #21.

This keeps the original SVG file rather than inlining it as in JakeHartnell#23.
The image is passed instead as a the `src` property to <img />. This
fixes JakeHartnell#22.
@JakeHartnell JakeHartnell merged commit 959b107 into JakeHartnell:master Apr 7, 2018
@ivnnv
Copy link
Collaborator

ivnnv commented Apr 8, 2018

I forgot to comment on this, but this doesnt not solve the issue of having to configure webpack to handle svg tags even when "importing" as a component (which is actually just a link to the file, not a proper comonent).
I was testing this in different environments and as the svg-loader is still needed... i personally wont merge this PR.
PS: More info on svg and why create-react-app is able to handle it (but webpack without loader can NOT)
facebook/create-react-app#1388
jhamlet/svg-react-loader#86 (comment)

@JakeHartnell
Copy link
Owner

I think we need to update some of the tooling on this repo. It would be nice if the npm package distributed a build common js module, I think that would make it much nicer to work with as a dependency in other projects.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Module parse failed: Unexpected token (85:10)
3 participants