Anomen / next-svgr

Convert your SVG files into React components in Next
MIT License
26 stars 9 forks source link

Next 11 breaks the plugin #7

Open mikestopcontinues opened 3 years ago

mikestopcontinues commented 3 years ago

Next 11 now has built in image loaders that get in the way of this plugin. You can do something like this:

      cfg.module.rules[2] = {
        oneOf: [
          {
            test: /\.svg$/,
            use: ['@svgr/webpack'],
          },
          cfg.module.rules[2],
        ],
      };
knightspore commented 3 years ago

You can also yarn add next@canary as this is fixed in the v11.0.1 release.