Skip to content

Commit

Permalink
vpk - improve HMR 'registration' injection formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
LankyMoose committed Oct 19, 2024
1 parent 2672b7c commit 96665fa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/vite-plugin-kaioken/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,9 @@ if (import.meta.hot && "window" in globalThis) {
`
if (import.meta.hot && "window" in globalThis) {
import.meta.hot.accept();
window.__kaioken.HMRContext?.register({${hotVars.map((name) => name).join(",\n")}});
window.__kaioken.HMRContext?.register({
${hotVars.map((v) => ` ${v}`).join(",\n")}
});
}`
} catch (error) {
console.error(error)
Expand Down

0 comments on commit 96665fa

Please sign in to comment.