Releases: rossrobino/domco
domco@2.0.0
Major Changes
-
371d3f7: Renames
+app
to+func
If you are using a UI framework with domco it's nice to have an
app
directory that can be imported on the server and client that holds the components of your application. Having the server entry point named+app
made the function of the module less clear. This change renames the+app
entry point to+func
. There are no other breaking changes.
create-domco@2.0.1
Patch Changes
- 557722d: bump versions
create-domco@2.0.0
Major Changes
-
371d3f7: Renames
+app
to+func
If you are using a UI framework with domco it's nice to have an
app
directory that can be imported on the server and client that holds the components of your application. Having the server entry point named+app
made the function of the module less clear. This change renames the+app
entry point to+func
. There are no other breaking changes.
Patch Changes
- e679eed: fix: prettier config formatting
domco@1.0.0
Major Changes
-
344d88a: v1.0.0
Stable API
Settled on an API and scope for the project.
domco follows semantic versioning, so there will no longer be breaking changes between minor versions now that the project is v1.
Breaking changes
None from v0.13, if upgrading from a lower version see the changelog or consult the documentation for details.
domco@0.13.3
Patch Changes
-
f498a79: fix: tags import chunks not found error
- Preloads modules that are imported into entry points in case of manual chunks are used.
create-domco@1.0.0
Major Changes
-
344d88a: v1.0.0
Stable API
Settled on an API and scope for the project.
domco follows semantic versioning, so there will no longer be breaking changes between minor versions now that the project is v1.
Breaking changes
None from v0.13, if upgrading from a lower version see the changelog or consult the documentation for details.
create-domco@0.2.1
Patch Changes
- 8a99276: use project name for title and header
domco@0.13.2
Patch Changes
- 74f1827: fix: windows entry point paths
domco@0.13.1
Patch Changes
- f915105: fix: reference on
DomcoConfig
and exportMaybePromise
domco@0.13.0
Minor Changes
-
d50685c: Server framework agnostic
This project had a lot of overlap with HonoX, HonoX should be the default if you are wanting all of the features Hono provides like client components. This update removes the dependency on Hono and making the library framework agnostic. Hono can still be easily used with domco (see below).
This makes domco have no dependencies other than Vite. You can now build your app with vanilla JS without any external libraries. You can now use any server framework like Hono that provides a function that handles a web
Request
and returns aResponse
. This update also simplifies domco's API and refactors much of the codebase to make it smaller and builds faster.Overview of Changes
+server
renamed to+app
+client
renamed to+script
- Instead of exporting the
app
as the default export, you now must exportapp.fetch
as a namedhandler
export. - Removes
page
,client
, andserver
context variables. page
is replaced with theclient:page
virtual module.script
is replaced with theclient:script
virtual module.- The
server
context variable is removed. This is better handled by the user - perhaps with libraries likeofetch
. - The
tags
imported fromclient:script
are now just strings, so you'll need to pass them throughhono/html
-raw
function to pass them into a JSX template if you were using them directly in Hono. - Multiple
+server
entry points are removed in favor of just onesrc/server/+app
entry. Note this is located withinsrc/server/
now instead of directly insrc/
. - Removes
+setup
- since domco no longer mounts routes, user can control the entire lifecycle through thehandler
. - Removes default immutable headers - leave to adapters instead.
- Import
handler
fromdist/server/app.js
instead of thecreateApp
export. - Script entry points are no longer automatically injected into pages in the same directory.
- Static pages must be prerendered, nothing from
src/client/
is included in the app if not imported into the server entry. - d.ts changes - instead of adding the context variable map, you now just need to add types for the virtual modules from
domco/env
.
/// <reference types="vite/client" /> /// <reference types="domco/env" />
Examples
Vanilla
import { html } from "client:page"; import type { Handler } from "domco"; export const handler: Handler = (req) => { const { pathname } = new URL(req.url); if (pathname === "/") { return new Response(html, { headers: { "Content-Type": "text/html", }, }); } return new Response("Not found", { status: 404 }); };
Hono - Migrate from 0.12
// src/server/+app.ts import { html } from "client:page"; import { Hono } from "hono"; const app = new Hono(); app.use((c) => c.html(html)); export const handler = app.fetch;