BUG-036
ID:BUG-036Status:fixed

The HTML starter never passes plugins to loadContent

Found by WORK-634 (#695).

packages/create-refrakt/template-html/build.ts calls loadContent without the plugins option. Its own comment (around line 127) says plugins should be passed through, matching the option shape createRefraktLoader uses for the Vite-based adapters. As a result:

Severity:majorMilestone:v0.41.3Source:SPEC-109
claude/milestone-v0-41-3-1mzttp View source
Branches 5
History 4
  1. 6f35356
    Content editedby bjornolofandersson
  2. 4503745
    Created (fixed)by bjornolofandersson
  3. abc833f
    Content editedby Claude
    plan: v0.41.3, v0.42.0 and v0.43.0 milestones
  4. c14f915
    Content editedby Claude
    plan: file BUG-035..037 from WORK-634's findings

Steps to Reproduce

  1. npx create-refrakt my-site --template html, and add a plugin with pipeline hooks (e.g. @refrakt-md/storytelling) to refrakt.config.json.
  2. Write two pages, one with a {% character %} and one with a {% bond %} naming it.
  3. Build.

Expected

The bond's edge is registered, the same as in the SvelteKit adapter.

Actual

No registrations. Plugin hooks never ran.

Fix

Load the configured plugins and pass them to loadContent, as the other adapters do. Cover it with a scaffold test that asserts a plugin hook ran.

Resolution

Completed: 2026-10-24

Branch: claude/milestone-v0-41-3-1mzttp

What was done

  • packages/create-refrakt/template-html/build.ts: keeps merged.plugins from mergePlugins and passes plugins, projectRoot and siteConfig to loadContent, as createRefraktLoader does.
  • packages/create-refrakt/test/scaffold-builds.test.ts: scaffolds the HTML starter inside the repo (so @refrakt-md/* resolve), adds @refrakt-md/storytelling, a character page and a page that bolds its name, runs the real build.ts (types stripped with esbuild), and asserts the storytelling postProcess hook turned the mention into a link in the built HTML. Fails without the fix.

Notes

  • projectRoot/siteConfig were added for parity with the other adapters: siteConfig carries entityRoutes and validation settings.