Fix HMR import.meta.hot for Bun static analysis #1

Merged
defunkt merged 1 commits from probablycorey/forge:fix/hmr-static-analysis into main 2026-01-21 00:02:47 +00:00

View File

@ -10,7 +10,9 @@ export function clearStyles() {
}
// HMR support - clear styles when module is replaced
import.meta.hot?.dispose(() => clearStyles())
if (import.meta.hot) {
import.meta.hot.dispose(() => clearStyles())
}
export function createTheme<const T extends Record<string, string | number>>(name: string, values: T): T {
themes[name] = values as Record<string, string | number>