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