jacobmischka/gatsby-plugin-react-svg

Error building on Vercel

urre opened this issue · 3 comments

urre commented

This plugin works great to build locally, but can't get it building on Vercel

Getting:

Error: Invalid tag: data:image/svg+xml;base64,....

Using this config:

  plugins: [
    {
      resolve: "gatsby-plugin-react-svg",
      options: {
        rule: {
          include: /icons/,
          omitKeys: [],
        },
      },
    },
    {
      resolve: `gatsby-source-filesystem`,
      options: {
        name: `icons`,
        path: `${__dirname}/src/icons`,
      },
    },
  ],

Guessing that the path isn't correct when building on vercel, try './src/icons instead of using __dirname maybe.

urre commented

I tried it, but getting the same invalid tag error when building...

urre commented

I got it working now. It was another thing that broke the build