如何解决下一个i18next生产重定向错误
我在生产中的Next i18Next有一个奇怪的错误。这是一些可以更好地描述问题的图像。
Here on localhost,the home page link
And then the search page on production
i18n.js
const NextI18Next = require('next-i18next').default;
const { localeSubpaths } = require('next/config').default().publicRuntimeConfig;
const path = require('path');
module.exports = new NextI18Next({
otherLanguages: ['fr_BE','nl_BE'],defaultLanguage: 'en',ns: ['common'],defaultNS: 'common',strictMode: false,browserLanguageDetection: false,serverLanguageDetection: false,localePath: path.resolve('./public/static/locales'),localeSubpaths
});
next.config.js
const { nextI18NextRewrites } = require('next-i18next/rewrites');
const localeSubpaths = {
en: 'en',fr_BE: 'fr_BE',nl_BE: 'nl_BE'
};
module.exports = {
// experimental: {
// reactMode: 'concurrent'
// },reactStrictMode: true,publicRuntimeConfig: {
localeSubpaths
},rewrites: async () => nextI18NextRewrites(localeSubpaths)
};
谢谢大家的关注和帮助。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。