i'm having issues with my next.js config file when trying to configure the next-i18next package (version 6) and also have a webpack config for audio, and a plugin for images. until the upgrade everything was fine, but now is not loading the defaultLanguage which i set.
my next.config.js looks like this:
const withImages = require('next-images');
const { nextI18NextRewrites } = require('next-i18next/rewrites');
const localeSubpaths = { en: 'en' };
module.exports = withImages({
webpack(config, options) {
const { isServer } = options;
config.module.rules.push({
test: /\.(ogg|mp3|wav|mpe?g)$/i,
exclude: config.exclude,
use: [
{
loader: require.resolve('url-loader'),
options: {
limit: config.inlineImageLimit,
fallback: require.resolve('file-loader'),
publicPath: `${config.assetPrefix}/_next/static/images/`,
outputPath: `${isServer ? '../' : ''}static/images/`,
name: '[name]-[hash].[ext]',
esModule: config.esModule || false,
},
},
],
});
return config;
},
rewrites: async () => nextI18NextRewrites(localeSubpaths),
publicRuntimeConfig: {
localeSubpaths,
},
});
any help would be appreciated.