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

How to add a webpack loader #64

Closed
mcanobbio opened this issue Feb 25, 2019 · 6 comments
Closed

How to add a webpack loader #64

mcanobbio opened this issue Feb 25, 2019 · 6 comments

Comments

@mcanobbio
Copy link

Is there a way to add a loader with some webpack configuration like this?https://ant.design/components/icon/#Custom-SVG-Icon

I found this example https://github.com/gitim/react-app-rewire-svgr/blob/master/index.js but I cannot make it works

@myzhoulang
Copy link

@mcanobbio 可以这样配置

image

@ghost
Copy link

ghost commented May 29, 2019

I'm facing the same problem with html-loader, i need to do this :
image
But I don't know how to insert this code inside my config-override.js

@space-77
Copy link

space-77 commented Jun 3, 2019

loader

image

@davidsonsns
Copy link

About SVG only for remember, in >= react-scripts@2.0.0 you can import svg direclty. See Adding SVGs

@jpcmf
Copy link

jpcmf commented Nov 28, 2019

@davidsonsns how about SVG Sprites?

@the-simian
Copy link
Collaborator

I added a PR that makes SVG manipulation a lot easier and is relevant to this thread: #271

If that gets pulled all you need to do is just include the convenience function like

override(
  enableSVGO()
 //....
);

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

7 participants