Adds svg-react-loader
to gatsby webpack config (and removes svg
s from the built-in url-loader
config).
The rule
plugin option can be used to pass rule options. If either include
or exclude
options are present, svg-react-loader
will use them and url-loader
will be reenabled with the inverse.
The following uses svg-react-loader
to process svgs from a path matching /assets/
, and url-loader
to process svgs from everywhere else.
{
resolve: 'gatsby-plugin-react-svg',
options: {
rule: {
include: /assets/
}
}
}