From 808acab4f56771ab5a0a1a6f132a30f0f439de21 Mon Sep 17 00:00:00 2001 From: Jan Amann Date: Tue, 20 Jun 2023 18:34:41 +0200 Subject: [PATCH] Fix error when no config is provided --- packages/next-intl/plugin.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/next-intl/plugin.js b/packages/next-intl/plugin.js index 0972ebaed..ed20f8cce 100644 --- a/packages/next-intl/plugin.js +++ b/packages/next-intl/plugin.js @@ -34,7 +34,7 @@ const withNextIntl = require('next-intl/plugin')( ); module.exports = withNextIntl({ - experimental: {appDir: true} + // Other Next.js configuration ... });\n`); } } @@ -49,7 +49,7 @@ module.exports = withNextIntl({ webpack(config, options) { config.resolve.alias['next-intl/config'] = require.resolve(i18nPath); - if (typeof nextConfig.webpack === 'function') { + if (typeof nextConfig?.webpack === 'function') { return nextConfig.webpack(config, options); }