Skip to main content

kickjs-bootstrap-export

Use when HMR is silently doing full restarts on every save, or createTestApp can't find the app handle.

Source facts

Repository
forinda/euc-app
Last source activity
September 25, 2026 at 12:32
Detected SKILL.md language
English
Stars
0
Forks
0

Install options

The review-first prompt is selected by default. You can switch to a direct command or download a local copy.

Review the source files

Read SKILL.md and any companion files shown by SkillsMP before deciding whether to install.

Showing SKILL.md

SKILL.md
Source instructions · Read-only preview
name
kickjs-bootstrap-export
description
Use when HMR is silently doing full restarts on every save, or createTestApp can't find the app handle.
<!-- Generated by `kick g agents` for euc-app. Edits are overwritten on the next refresh; keep customisation in a SKILL.local.md alongside. --> **Check** `src/index.ts`'s last line: ```ts // CORRECT — Vite plugin + createTestApp import the named `app` symbol export const app = await bootstrap({ ... }) // WRONG — HMR degrades to full restart, createTestApp loses the handle await bootstrap({ ... }) ``` The Vite plugin imports the named `app` symbol via `virtual:kickjs/app`; testing helpers do too. Without the export, both fall back to slower paths (full restart on save, mock handle in tests) **without warning**. **Red flags**: - A bare `await bootstrap(...)` with no `export` — fix by adding `export const app =`. - Re-assigning `app` later in the file (`app = somethingElse`) — Vite imports by reference at module-load time; reassignments don't propagate. - Multiple files calling `bootstrap()` — only the entry should. Tests use `createTestApp` instead.
View on GitHub