From a5e11fb85fca0ef1bf444150ae514621ab3f0202 Mon Sep 17 00:00:00 2001 From: Hubert Bieszczad Date: Thu, 12 Dec 2024 13:59:43 +0100 Subject: [PATCH] fix: circular dependency fail --- src/web/runtime.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/web/runtime.ts b/src/web/runtime.ts index 31846ab7..fdd078c3 100644 --- a/src/web/runtime.ts +++ b/src/web/runtime.ts @@ -4,9 +4,11 @@ import type { UnistylesMiniRuntime } from '../specs/UnistylesRuntime' import { WebContentSizeCategory } from '../types' import { UnistylesListener } from './listener' import { NavigationBar, StatusBar } from './mock' -import { UnistylesState } from './state' import { error, isServer, schemeToTheme } from './utils' +// Keep this import here, otherwise circular dependency will occur and break the build +import { UnistylesState } from './state' + class UnistylesRuntimeBuilder { lightMedia = this.getLightMedia() darkMedia = this.getDarkMedia()