Lit.Server.Unofficial
2.19.0
dotnet add package Lit.Server.Unofficial --version 2.19.0
NuGet\Install-Package Lit.Server.Unofficial -Version 2.19.0
<PackageReference Include="Lit.Server.Unofficial" Version="2.19.0" />
<PackageVersion Include="Lit.Server.Unofficial" Version="2.19.0" />
<PackageReference Include="Lit.Server.Unofficial" />
paket add Lit.Server.Unofficial --version 2.19.0
#r "nuget: Lit.Server.Unofficial, 2.19.0"
#:package Lit.Server.Unofficial@2.19.0
#addin nuget:?package=Lit.Server.Unofficial&version=2.19.0
#tool nuget:?package=Lit.Server.Unofficial&version=2.19.0
Lit.Server.Unofficial
Render Fable.Lit templates to HTML on .NET — no Node, no @lit-labs/ssr.
dotnet add package Lit.Server.Unofficial
The same html $"..." view compiles to lit in the browser and to HTML on the server,
because both sides resolve open Lit — one against this package, the other against
Fable.Lit.Unofficial. No conditional compilation, no template written twice.
open Lit
open Lit.Server
let counter, _ = Views.Counter.init ()
// Plain HTML.
Server.render (Views.Counter.view counter ignore)
// HTML carrying lit's hydration markers, so the browser can adopt it
// with Hydrate.adopt or Program.withLitHydrated.
Server.renderHydratable (Views.Counter.view counter ignore)
Server.toNode and Server.toHydratableNode return a node rather than a string, for
composing into HtmlTypeProvider templates
without anything being escaped twice. Server.toShadowRootNode emits
<template shadowrootmode="open"> with styles inside, which the parser attaches as a
shadow root while it reads the page.
Event handlers are dropped on the server — a closure cannot be serialised — and become real listeners the moment lit adopts the markup.
There is a worked example at LitHydrationDemo.
This package has no Fable dependency: it is ordinary .NET, referenced by the server project.
Why "Unofficial"
This is a republished build of Fable.Lit by Alfonso García-Caro Núñez and its contributors, packaged from a fork so that fixes can be used before they land upstream. The toolchain is .NET 10, Fable 5, Fable.Core 4 and lit 3.
Reference this or upstream Fable.Lit, never both: they share the Lit namespace.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- FSharp.Core (>= 10.1.400)
- HtmlTypeProvider (>= 0.9.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.19.0 | 81 | 8/14/2026 |
| 2.18.0 | 75 | 8/14/2026 |
| 2.17.0 | 82 | 8/14/2026 |
| 2.16.0 | 82 | 8/14/2026 |
| 2.15.0 | 80 | 8/14/2026 |
| 2.14.0 | 87 | 8/13/2026 |
| 2.13.0 | 76 | 8/13/2026 |
| 2.12.0 | 74 | 8/13/2026 |
| 2.11.0 | 79 | 8/13/2026 |
| 2.10.0 | 77 | 8/13/2026 |
| 2.9.0 | 76 | 8/13/2026 |
| 2.8.0 | 80 | 8/13/2026 |
| 2.7.1 | 82 | 8/13/2026 |
| 2.7.0 | 79 | 8/13/2026 |
| 2.6.0 | 79 | 8/12/2026 |
| 2.5.0 | 95 | 8/12/2026 |
| 2.4.0 | 91 | 8/12/2026 |
| 2.3.0 | 88 | 8/12/2026 |
Unofficial fork of Fable.Lit. Toolchain moved to .NET 10, Fable 5, Fable.Core 4 and lit 3; event handlers no longer raise FS3884. See the repository for what differs from upstream.