Skip to content

Replace astro playground with Vite + React (cut the ~500-pkg staleness surface) #14

Description

@arzafran

Context

The published hamo package is lean — zero runtime deps, ESM-only, 16.8 kB packed. The remaining dependency weight in the repo is almost entirely the astro playground: ~500 of the ~566 packages in bun.lock come from astro + @astrojs/check (language server, vite, esbuild, sharp, shiki, …).

It's dev-only and not published, so it never reaches consumers — but it is the repo's staleness surface: every Dependabot/bun audit finding so far has originated in astro (the v1-prep pass had to bump astro and override yaml/esbuild just to get bun audit back to 0).

The playground only needs to render a few hook demos. Astro's SSR/content/image toolchain is far more than that requires.

Proposal

Replace the astro playground with a minimal Vite + React app.

  • Same demo capability with a fraction of the dependencies → smaller lockfile, far less recurring advisory churn.
  • The main demo (playground/react/scroll-trigger-app.tsx) is already plain React .tsx and should port with little change.
  • Keep it a workspace:* consumer of packages/hamo (validates the published entry points during local dev).

Scope

  • New playground/ on Vite + React (@vitejs/plugin-react), TypeScript 6.
  • Port the existing demos: react and scroll-trigger (incl. the hamo/scroll-trigger/debugger overlay).
  • Drop astro, @astrojs/react, @astrojs/check and the yaml/esbuild root overrides that only exist to patch astro's transitive tree.
  • bun --filter playground build green; bun run dev serves the demos.
  • CORS/host notes if any (the old astro dev --host bound to 0.0.0.0).

Acceptance

  • bun audit stays at 0 without the astro-driven overrides.
  • Lockfile package count drops substantially.
  • Library, its CI, and the published artifact are untouched (playground is not published and not in the publish gate).

Notes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions