Next.js Discord

Discord Forum

Next.js config issues

Unanswered
American Crocodile posted this in #help-forum
Open in Discord
American CrocodileOP
Error message - The root value has an unexpected property, webpackDevMiddleware, which is not in the list of allowed properties (amp, analyticsId, assetPrefix, basePath, cleanDistDir, compiler, compress)

My next.js config
hTM = require('next-transpile-modules')(['echarts', 'zrender']);
const withBundleAnalyzer = require('@next/bundle-analyzer')({
  enabled: process.env.ANALYZE === 'true',
});

const nextConfig = {
  compiler: {
    styledComponents: true,
  }
};

module.exports = withPlugins([withTM, withBundleAnalyzer], nextConfig);

0 Replies