Use --watch, not --hot

This commit is contained in:
Chris Wanstrath 2026-04-07 20:03:39 -07:00
parent de20042d14
commit 1100f6ad01
2 changed files with 1 additions and 6 deletions

View File

@ -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"
},

View File

@ -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<const T extends Record<string, string | number>>(name: string, values: T): T {
themes[name] = values as Record<string, string | number>
return values