Skip to content

Experimental keys

A feature that may still change shape lives under experimental in hamur.config.ts. Every key is off by default, and a key may change or go away in a minor release, which a stable key may not. Turn one on only when you can follow the release notes.

ts
import { defineConfig } from "hamur"

export default defineConfig({
  framework: "html",
  experimental: {
    webmcp: true,
    mcp: true,
    offlineRetry: true,
    islands: { libraries: ["react"] },
    runtimeBaseURL: true,
  },
})

A key takes a boolean, except islands, which also takes { libraries }. A value of another type fails the load: experimental.mcp must be a boolean (got "yes"). A key under experimental that Hamur does not know logs one warning at load.

A key leaves experimental in one of two ways. When it graduates it gets a key of its own, the old name still works for one minor release, and the load logs [hamur] experimental.<key> is now <new key>. When it is removed, the load says so in one line.

Every key

KeyWhat it turns onStatus
experimental.webmcpthe app's WebMCP tools: app/tools/*.ts, tools of a page, tools from forms and from modules, and useTools()built; follows a W3C Community Group draft
experimental.mcpthe mcp key of defineHandler: an MCP endpoint with tools, resources, prompts and protected-resource metadatabuilt; follows the protocol's revisions
experimental.offlineRetrya navigation, prefetch or useFetch that failed on the network waits for online and retries with backoff, up to 5 minutes. See Configurationbuilt
experimental.islandsisland pages, server islands and prerender: "shell"; { libraries } lets an html app host islands of a second UI library. See Islands and streamingbuilt
experimental.svelteAsyncawait in a Svelte component's script or markup, on the server and in the browser; svelte apps only. See Islands and streamingbuilt
experimental.reactCompilerBun's React Compiler over the app's .jsx and .tsx files in hamur build; react apps only. See Configurationbuilt
experimental.runtimeBaseURLHAMUR_APP_BASE_URL replaces app.baseURL when the server starts; the bun and node presets only. See Build outputbuilt