Headless requires vite — declare an (optional) peer and/or own it via a @srhazi/gooey-test/vite plugin #2
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Headless mode currently requires the consumer to have
viteinstalled (the runner starts the consumer's Vite so their config/plugins apply), butviteis not declared anywhere — so it's easy to miss and the run fails withspawn vite ENOENT.Options:
peerDependencyvite(documented) — npm 7+/pnpm auto-install it; yarn-classic still needs an explicit install. Imposes Vite on browser-only consumers only as a peer.dependency— always present, but pins/duplicates Vite (and the runner would still prefer the consumer's hoisted copy so their config applies). Two Vite versions is a footgun.Recommendation: don't hard-depend on Vite — we want the consumer's Vite/config. Declare it as an optional peer, and let the real fix be a
@srhazi/gooey-test/viteplugin that owns the integration: serve the runner entry at a stable path and discover test files via a virtual module (import.meta.glob), so hosted-browser and headless modes "just work" without hand-wiring Vite or a#/a.test.ts:b.test.tsURL. That plugin can also provide sane Vite defaults/fallback.Related: PR #1 (headless runner), review comment 129.
Related: PR #1 review comment #129 (the lead's question) and the proposal in #146.
@srhazi/gooey-test/viteplugin + optionalvitepeer (#2) #14simplify referenced this issue2026-10-13 13:54:14 +00:00