feat(frontend): update i18n default loader

This commit is contained in:
이강준
2022-11-27 14:58:55 +09:00
parent c14d1d4fcc
commit 14bffebc55
8 changed files with 99 additions and 87 deletions
+6 -1
View File
@@ -1,9 +1,14 @@
const workaround = require("next-translate/lib/cjs/plugin/utils.js");
workaround.defaultLoader =
"(l, n) => import(`@next-translate-root/locales/${l}.json`).then(m => m?.default[n] ?? {} )";
module.exports = {
locales: ["en-US", "ko-KR"],
defaultLocale: "en-US",
pages: {
"*": ["common", "nav"],
"reg:^/(login|signup)": ["auth"],
"rgx:^/(login|signup)": ["auth"],
"/dashboard/[id]": ["dashboard"],
},
};