Use --watch, not --hot
This commit is contained in:
parent
de20042d14
commit
1100f6ad01
|
|
@ -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"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user