From 8e1e6ef5d164dd6f29120e2a5413c3a21d0fb049 Mon Sep 17 00:00:00 2001 From: Jan Cizmar Date: Fri, 26 Aug 2022 21:39:51 +0200 Subject: [PATCH] fix: Svelte with auto/node adapter (Import UI only in browser) --- packages/svelte/src/lib/TolgeeProvider.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/svelte/src/lib/TolgeeProvider.svelte b/packages/svelte/src/lib/TolgeeProvider.svelte index 11fb8b4eea..6b0b7ae9ab 100644 --- a/packages/svelte/src/lib/TolgeeProvider.svelte +++ b/packages/svelte/src/lib/TolgeeProvider.svelte @@ -8,7 +8,7 @@ const tolgee = Tolgee.use(IcuFormatter).init({ wrapperMode: 'invisible', ui: - process.env.NODE_ENV !== 'development' + process.env.NODE_ENV !== 'development' && typeof window == 'undefined' ? undefined : typeof require !== 'undefined' ? require('@tolgee/ui')