From 1100f6ad01b8d7e7a78236a1d49e86b38ba3056f Mon Sep 17 00:00:00 2001 From: Chris Wanstrath Date: Tue, 7 Apr 2026 20:03:39 -0700 Subject: [PATCH] Use --watch, not --hot --- package.json | 2 +- src/index.tsx | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/package.json b/package.json index 16809ae..7c9271c 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "README.md" ], "scripts": { - "dev": "bun build:spa && bun run --hot server.tsx", + "dev": "bun build:spa && bun --watch run server.tsx", "test": "bun test", "build:spa": "bun build examples/spa/index.tsx --outfile dist/spa.js --target browser" }, diff --git a/src/index.tsx b/src/index.tsx index 5ee7d81..4d56180 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -8,11 +8,6 @@ export function clearStyles() { for (const key in themes) delete themes[key] } -// HMR support - clear styles when module is replaced -if (import.meta.hot) { - import.meta.hot.dispose(() => clearStyles()) -} - export function createTheme>(name: string, values: T): T { themes[name] = values as Record return values