gatsby-plugin-react-svg
gatsby-plugin-react-svg copied to clipboard
Error on documentation in gatsby-config.js
Hi, I searched for a solution to this problem for hours but finally found it with my own efforts. While the usage pattern shown in the document in the config file is as below, giving the rule object and regex without using strings creates a problem.
1- remove rule and use include under options 2- put regex expressions between string tags
plugins: [
{
resolve: "gatsby-plugin-react-svg",
options: {
rule: {
include: /assets/ // See below to configure properly
}
}
}
];
should be
plugins: [
{
resolve: "gatsby-plugin-react-svg",
options: {
include: "/assets/"
}
}
];
Produced error on documentation way:
Failed to execute 'createElement' on 'Document': The tag name provided ('data:image/svg+xml;base64,PD94bWwgdmV ..... is not a valid name.
Thank you for that great plugin also! 🔥🔥
Edit: I can open a PR on that if you're ok