Skip to content
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

add support file #1

Closed
juanpablocs opened this issue Nov 2, 2019 · 4 comments
Closed

add support file #1

juanpablocs opened this issue Nov 2, 2019 · 4 comments

Comments

@juanpablocs
Copy link

Please add support with import file or component

example

import { ReactComponent as Logo } from './logo.svg';
// usage <Logo />

//or
import logo from './logo.svg';
// usage <img src={logo} />
@DeviousM
Copy link
Owner

DeviousM commented Nov 2, 2019

Hi, SVGR is made to solve the issue of importing SVG files to React apps. It converts them to React components, but doesn't allow for URL imports. If you want to achieve that, you probably will want to use the webpack's standard file-loader.

@juanpablocs
Copy link
Author

juanpablocs commented Nov 2, 2019

I would like to use both cases as in webpack.

When I use your plugin, the svg files can no longer be imported as a file.

In a complex react application I cannot change all the svg to components, so I would like to have both options with its plugin.

@DeviousM
Copy link
Owner

DeviousM commented Nov 6, 2019

So you'd want it to work the way create-react-app makes it work?

@juanpablocs
Copy link
Author

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

No branches or pull requests

2 participants