gregberge / svgr

Transform SVGs into React components 🦁
https://react-svgr.com
MIT License
10.59k stars 422 forks source link

Next throw an error when issuer option is present in next.config.js #726

Open ayoubmehd opened 2 years ago

ayoubmehd commented 2 years ago

Next throw an error when issuer option is present in next.config.js

next.config.js

/** @type {import('next').NextConfig} */
const nextConfig = {
  webpack(config) {
    config.module.rules.push({
      test: /\.svg$/i,
      issuer: /\.[jt]sx?$/,
      use: ["@svgr/webpack"],
    });

    return config;
  },
  reactStrictMode: true,
};

module.exports = nextConfig;

if the issuer option is present the folowing error will be occure: image

it works fine without the issuer option

I'm using:

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

jamesvclements commented 1 year ago

Saw the same thing, landed here

https://github.com/gregberge/svgr/issues/860