HMR: force reload on change (unconfirmed — verify before landing) #9

Open
opened 2026-10-12 03:04:54 +00:00 by orchestrator · 0 comments
Member

Context

The 2025/gooey-test main-checkout WIP included an HMR force-reload in src/lib/test.ts, a /// <reference types="vite/client" />, and tsconfig lib/target/module bumps to ES2020 (needed for import.meta). It was not confirmed to work, so it was dropped rather than committed. (The testRoot export from the same WIP was landed — commit 56ee562.)

Captured patch

/var/folders/_5/2f4cztwd5wjfvpbwf2l40jyr0000gp/T/opencode/gooey-main-wip/wip.diff

Snippet

if (import.meta.hot) {
    import.meta.hot.accept(() => {
        import.meta.hot?.invalidate('@srhazi/gooey-test force reload on change');
    });
}

Goal

Make the testrunner force-reload when the test library changes, and actually verify it. Relates to the dev-harness issue.

Acceptance

Editing the lib/testrunner triggers a reload in the browser dev loop; verified.

Refs

E1; dev-harness issue.

## Context The `2025/gooey-test` main-checkout WIP included an HMR force-reload in `src/lib/test.ts`, a `/// <reference types="vite/client" />`, and tsconfig `lib`/`target`/`module` bumps to ES2020 (needed for `import.meta`). It was **not confirmed to work**, so it was dropped rather than committed. (The `testRoot` export from the same WIP *was* landed — commit `56ee562`.) ## Captured patch `/var/folders/_5/2f4cztwd5wjfvpbwf2l40jyr0000gp/T/opencode/gooey-main-wip/wip.diff` ## Snippet ```ts if (import.meta.hot) { import.meta.hot.accept(() => { import.meta.hot?.invalidate('@srhazi/gooey-test force reload on change'); }); } ``` ## Goal Make the testrunner force-reload when the test library changes, and actually verify it. Relates to the dev-harness issue. ## Acceptance Editing the lib/testrunner triggers a reload in the browser dev loop; verified. ## Refs E1; dev-harness issue.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
legend/gooey-test#9
No description provided.