Skip to content

Instantly share code, notes, and snippets.

@zanza00
Last active June 22, 2017 13:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zanza00/505398b7bf77832fa2a405a63e62484a to your computer and use it in GitHub Desktop.
Save zanza00/505398b7bf77832fa2a405a63e62484a to your computer and use it in GitHub Desktop.
inline svg trough webpack
}, {
// 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