refactor(i18n): lazy load languages (#8456)

closes AF-1397
This commit is contained in:
forehalo
2024-10-10 09:03:06 +00:00
parent f833017e45
commit 9043e6607e
60 changed files with 731 additions and 668 deletions
-32
View File
@@ -1,32 +0,0 @@
import { resolve } from 'node:path';
import { runCli } from '@magic-works/i18n-codegen';
import { projectRoot } from '../config/cwd.cjs';
const configPath = resolve(projectRoot, '.i18n-codegen.json');
export const watchI18N = () => {
runCli(
{
config: configPath,
watch: true,
},
error => {
console.error(error);
}
);
};
export const buildI18N = () => {
runCli(
{
config: configPath,
watch: false,
},
error => {
console.error(error);
process.exit(1);
}
);
};