Skip to content

Commit

Permalink
Fix error when no config is provided
Browse files Browse the repository at this point in the history
  • Loading branch information
amannn committed Jun 20, 2023
1 parent b219e13 commit 808acab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/next-intl/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const withNextIntl = require('next-intl/plugin')(
);
module.exports = withNextIntl({
experimental: {appDir: true}
// Other Next.js configuration ...
});\n`);
}
}
Expand All @@ -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);
}

Expand Down

0 comments on commit 808acab

Please sign in to comment.