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.
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
| Key | What it turns on | Status |
|---|---|---|
experimental.webmcp | the 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.mcp | the mcp key of defineHandler: an MCP endpoint with tools, resources, prompts and protected-resource metadata | built; follows the protocol's revisions |
experimental.offlineRetry | a navigation, prefetch or useFetch that failed on the network waits for online and retries with backoff, up to 5 minutes. See Configuration | built |
experimental.islands | island pages, server islands and prerender: "shell"; { libraries } lets an html app host islands of a second UI library. See Islands and streaming | built |
experimental.svelteAsync | await in a Svelte component's script or markup, on the server and in the browser; svelte apps only. See Islands and streaming | built |
experimental.reactCompiler | Bun's React Compiler over the app's .jsx and .tsx files in hamur build; react apps only. See Configuration | built |
experimental.runtimeBaseURL | HAMUR_APP_BASE_URL replaces app.baseURL when the server starts; the bun and node presets only. See Build output | built |