kickjs-bootstrap-export
Use when HMR is silently doing full restarts on every save, or createTestApp can't find the app handle.
ソース情報
- リポジトリ
- forinda/kickjs-examples-archive
- ソースの最終更新活動
- 2026年10月16日 00:14
- 検出された SKILL.md の言語
- 英語
- スター
- 0
- フォーク
- 0
インストール方法
デフォルトでは、最初にソースを確認する Prompt が選択されています。直接コマンドに切り替えるか、ローカルコピーをダウンロードすることもできます。
ソースファイルを確認
インストールを決める前に、SKILL.md と SkillsMP に表示されている付属ファイルをお読みください。
SKILL.md を表示中
SKILL.md
ソースの指示 · 読み取り専用プレビュー- 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 settings-api. 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.
GitHubで見る