Last active
June 22, 2017 13:50
-
-
Save zanza00/505398b7bf77832fa2a405a63e62484a to your computer and use it in GitHub Desktop.
inline svg trough webpack
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
}, { | |
// if the file ends with .inline.svg read the content from file | |
// useful if you want to inline the image and style it via css | |
test: /\.inline.svg$/, | |
loader: 'raw-loader', | |
}, { | |
// if the file ends only with .svg load as an image | |
// to use it like this <img scr={...} /> | |
test: /(s)((?!inline).)*svg$/, | |
loader: 'file-loader', | |
}, { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment