Yuki Takei 3 лет назад
Родитель
Сommit
b721191dfd
1 измененных файлов с 12 добавлено и 7 удалено
  1. 12 7
      packages/app/next-i18next.config.js

+ 12 - 7
packages/app/next-i18next.config.js

@@ -1,10 +1,15 @@
-import path from 'path';
+const path = require('path');
 
-export const
-  i18n = {
+const i18nextConfigs = {
+  i18n: {
     defaultLocale: 'en_US',
     locales: ['ja_JP', 'zh_CN'],
-  };
-export const defaultNS = 'translation';
-export const localePath = path.resolve('./public/static/locales');
-export const allLocales = [i18n.defaultLocale].concat(i18n.locales);
+  },
+  defaultNS: 'translation',
+  localePath: path.resolve('./public/static/locales'),
+};
+
+module.exports = {
+  ...i18nextConfigs,
+  allLocales: [i18nextConfigs.defaultLocale].concat(i18nextConfigs.locales),
+};