SolidZORO/next-plugin-antd-less

Error with <Image /> component Antd

qunahui opened this issue · 1 comments

I am using next-plugin-antd-less@1.5.2, antd@4.16.13 and next@12.0.3. Everything seems ok but when I use Image it will report an error:

image

my next.config.js:

  webpack(config) {
    config.module.rules.push({
      test: /\.svg$/,
      use: ['@svgr/webpack'],
    });
    const webpack = require('webpack');
    config.plugins.push(
      new webpack.ProvidePlugin({
        'window.Quill': 'quill/dist/quill.js',
        Quill: 'quill/dist/quill.js',
      })
    );
    return config;
  },

  rewrites: async () => nextI18NextRewrites(localeSubpaths),
  publicRuntimeConfig: {
    localeSubpaths,
  },
  env: {
  },
});```


I fixed it by downgrading Next version to 12.0.2. Looks like this is a bug for the new version of Next.