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.

Datos de origen

Repositorio
forinda/tasky
Última actividad en el origen
6 de agosto de 2026 a las 16:02
Idioma detectado de SKILL.md
inglés
Estrellas
0
Forks
1

Opciones de instalación

De forma predeterminada está seleccionado el prompt que primero revisa el origen. Puedes cambiar a un comando directo o descargar una copia local.

Revisa los archivos de origen

Lee SKILL.md y los archivos complementarios que muestra SkillsMP antes de decidir si quieres instalarlo.

Mostrando SKILL.md

SKILL.md
Instrucciones de origen · Vista previa de solo lectura
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 adero-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.
Ver en GitHub