fix snapshot test

pull/12537/head
Simon Holthausen 2 years ago
parent 45d94fae01
commit c654376af2

@ -10,16 +10,12 @@ function Hmr($$anchor) {
} }
if (import.meta.hot) { if (import.meta.hot) {
const s = $.source(Hmr); const $$hmr = $.hmr(Hmr);
const filename = Hmr.filename;
const $$original = Hmr;
Hmr = $.hmr(s); Hmr = $$hmr.wrapper;
Hmr.filename = filename;
Hmr[$.ORIGINAL] = $$original;
import.meta.hot.accept((module) => { import.meta.hot.accept((module) => {
$.set(s, module.default[$.ORIGINAL]); $$hmr.update(module.default);
}); });
} }

Loading…
Cancel
Save