Coralite v1.3.0 Released
Coralite v1.3.0 strengthens static-first output with zero-runtime JavaScript by default, makes `coralite-ignore` the single opt-out across the HTML pipeline, removes dummy-export requirements for zero-JS static components, and adds Codeberg release tooling.
Coralite v1.3.0 shipped on November 12, 2026. This post highlights what changed. The complete list of commits and links is in the changelog entry for v1.3.0.
`coralite-ignore` becomes the single HTML opt-out
Coralite now treats coralite-ignore as the one directive that opts markup out of token interpolation, custom-element compilation, hydration marking, validation, automatic fixing, and page-controller extraction. The parser, renderer, validators, fixers, and Volar plugin share offset-aware HTML parsing, so diagnostics and fixes point at exact source locations.
parseHTML()andextractScriptTagsFromHTML()track source offsets for<script>tags.<slot coralite-ignore>marks projected slot content as literal.- A page may contain exactly one Coralite page controller
<script>; duplicate controllers fail withCORALITE-E107. - Normal browser scripts remain allowed and untouched.
- The renderer marks the selected page controller for removal and strips it from rendered output.
- Rendered page config omits internal
page.scriptandpage.blocksvalues. - The build parses pages once and reuses parsed elements across handlers and rendering.
- Component reports expose
ignoredSlotsandtemplateSlots. - The renderer preserves unknown
tokens inside regular custom-element slots and keeps ignored slots fully literal.
The pipeline no longer automatically ignores custom elements inside <template>, <code>, <pre>, or <noscript>. Add coralite-ignore explicitly when literal markup is required. Components with declared slots no longer blanket-suppress validation; only coralite-ignore subtrees or explicitly ignored slots suppress processing.
<!-- src/components/code-block.html -->
<template id="code-block">
<pre><code><slot coralite-ignore></slot></code></pre>
</template>
<!-- src/pages/index.html -->
<code-block>
<script type="module">
export function server() {
return { count: 0 }
}
</script>
</code-block>
<script type="module">
export function server() {
return { title: 'Pipeline' }
}
export const getters = {
greeting: ({ state }) => state.title
}
</script>
Rendered result:
- The renderer removes the page controller script from the output.
- The
code-blockslot content stays literal. - The renderer leaves embedded
and script text untouched. - Normal page scripts and external scripts stay intact.
- The
code-blockcomponent still compiles normally.
Zero-JS static components without dummy exports
Coralite now renders purely static components without placeholder exports or non-empty <script type="module"> blocks. evaluateDevelopment() and evaluateProduction() return an empty component definition when a module script declares no recognized named exports. parseModule() accepts empty or comment-only sibling scripts instead of raising Script tag must contain text.
- Components with helper exports, comments, or no script render as zero-JS static components in development and production.
- Static components no longer require boilerplate such as
export const attributes = {}.
Before:
<template id="x-card">
<div class="card">
Static content
</div>
</template>
<script type="module">
export const attributes = {}
</script>
Now:
<template id="x-card">
<div class="card">
Static content
</div>
</template>
An empty script block also remains valid:
<template id="x-card">
<div class="card">
Static content
</div>
</template>
<script type="module"></script>
Codeberg release tooling and versioned release archives
The CLI adds Codeberg release support, versioned release archives, and tabbyAPI integration. The package also adopts a versioned release-note layout under packages/coralite/releases/.
- The new layout stores one Markdown file per released version.
- The added v1.1.0 and v1.2.0 notes document prior static rendering, page state, runtime namespace, and diagnostic work.
- The provided diff does not expose the CLI surface, so this note does not list exact flags.
packages/coralite/releases/
├── v1.1.0.md
└── v1.2.0.md
Bug Fixes & Improvements
Concurrent dynamic renders isolate page context
Coralite gives each concurrent dynamic render its own page object and fresh meta bag. The previous shared page object allowed the last writer to win, so enumerated locales rendered the same server() route params for every URL.
- The dev server stops caching dynamic documents under the shared source-path request key.
- Concrete route keys hold the HTML cache entries.
- The dev server exposes
listener.close()teardown that stops the live-reload watcher and disposes the esbuild context. - Release dry-run verification skips lifecycle scripts so it no longer rebuilds
distunder concurrent test suites.
Dynamic import resolution anchors authored files
Coralite rewrites dynamic import expressions to a Coralite-aware importer before the production CommonJS transform. Relative and bare specifiers now resolve from the authored component or page instead of the executing library file.
rewriteDynamicImportspreserves lines, strings, comments, andimport.meta.createDynamicResolverandcreateDynamicImporterhandle extensionless files, directory indexes, JSON fallbacks, builtins, and virtualcoralitemodules.- Production transforms define
import.meta; development exposesimport.meta.urlandimport.meta.resolve. - The compiler prefers ESM conditional exports for bare imports.
Imperative custom elements load from client contexts
Plugin and page client code now create imperative custom elements through Coralite on-demand loaders. The update adds phase-2 and hook instance scoping, target owner fallback, docs, and regression coverage.
Nested slotted custom elements hydrate correctly
The renderer compiles nested custom elements inside slotted HTML and registers hydration for them. New browser e2e tests cover nested slotted custom elements.
Page token and changelog rendering
Coralite extracts the website changelog into <coralite-changelog no-hydration> and renders it server-side without page token hydration overhead.
- The renderer parses HTML tokens directly through
parseHTMLand removes theisomorphic-dompurifydependency. - It differentiates HTML and plain-text tokens with
<c-token>DOM boundaries and single-pass token evaluation. - Stable
textIndextracking splits mixed text nodes strictly around HTML tokens. - Slotted HTML page tokens now work inside custom elements.
- Static server-only pages omit page token markers and
pageConfigObjserialization. - The page runtime guard and
updatePageTokenshandletype: htmlwithout SSR overwrite.
cleanUrls nested index pages
The dev server resolves cleanUrls: false nested index pages correctly. Tests cover nested index mapping and collisions.
Compiler performance refinements
The compiler skips slotted CSS partitioning when unused, avoids redundant token scans, reuses the script AST for stylesheet extraction, and reuses parsing artifacts across the build pipeline.
Quote-aware client HTML attribute rewriting
Client HTML attribute rewriting now respects quoted values, so rewrites do not corrupt quoted attribute content.
Page script extraction skips literal regions
The page script extractor skips templates and code blocks, so embedded literal markup does not interfere with controller selection.
Internal Changes
Documentation consolidation
Coralite consolidates imperative component guidance into a canonical reference page and adds short summaries and links across guides and agent docs. It documents imperative component dependency tracking, scanned versus unscanned client code, literal tag tracking, helper-module fallbacks, production DOM patch differences, and testing-mode masking.
The coralite-ignore reference page documents page-element, custom-element, component-template, and slot semantics; distinguishes the attribute from validator pragma comments; documents one page controller script, normal script rules, CORALITE-E107, script/style raw text, fallback processing, and ignoreByAttribute differences.
Compiler runtime namespace
The compiler nests dynamic import runtime under the coralite namespace. It replaces ad-hoc _<em>coralite</em>import<strong> and </strong>coralite<em>import</em>meta<strong> parameters with a single coraliteRuntime namespace object and stores linker-imported modules under globalThis.</strong>coralite__.imports instead of VM sandbox globals.
Module and test maintenance
The inject module moves regex constants to the top of the file. Test updates fix stale hydration and module-resolution assertions, isolate e2e servers on dedicated ports, and dispose the dev-mode esbuild context in the named-exports spec. The package version moves to 1.3.0.
Get Started
Scaffold a new project with the create script, then start the development server:
npm create coralite@latest my-app
cd my-app
npm run dev
The same command works with other package managers:
pnpm create coralite my-app
yarn create coralite my-app