From c9f1ccc4c5599946c930e832ffb07e52b5b7f402 Mon Sep 17 00:00:00 2001 From: George Oastler Date: Wed, 31 Jan 2024 09:45:31 +0000 Subject: [PATCH] fix i18n setup to avoid setInterval call, allowing node to exit cleanly --- packages/common/src/i18n.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/common/src/i18n.ts b/packages/common/src/i18n.ts index afd3f80670..16202b34a2 100644 --- a/packages/common/src/i18n.ts +++ b/packages/common/src/i18n.ts @@ -42,7 +42,7 @@ if (isClientSide()) { .use(initReactI18next) .init({ ...commonOptions, ...reactOptions }) } else { - i18n.use(Backend) + i18n.use(new Backend(undefined, { reloadInterval: false })) // THIS IS THE LINE THAT CAUSES THE ERROR WHERE VITE NEVER EXITS THE BUNDLING PROCESS! It is due to a setInterval call in this class. Set reloadInterval to false to avoid the interval setup. .use(MiddlewareLanguageDetector) .init({ ...commonOptions, ...nodeOptions }) }