LessJS deploys static files first. Runtime API routes are deployed separately through serverless or edge adapters when your application needs dynamic behavior.
deno task build
The build writes dist/: static HTML with Declarative Shadow DOM, client island chunks and copied public assets.
Set Vite base when deploying under a repo path.
Build command: deno task build; output: dist.
Publish directory: dist.
Use static output with framework preset “Other”.
Upload dist and configure cache headers deliberately.
If the site is served from https://user.github.io/repo/, configure the base path in Vite.
// vite.config.ts
import { defineConfig } from 'vite';
import { less } from '@lessjs/core';
export default defineConfig({
base: '/repo/',
plugins: [less()],
});
API routes belong to the generated Hono app. Static hosts do not execute them automatically. Deploy API routes through a platform adapter when the app needs runtime behavior.
| Target | Status | Notes |
|---|---|---|
| Deno Deploy | Natural target | Closest to the Deno-first development model. |
| Cloudflare Workers | Good target | Hono already maps well to Workers. |
| Vercel / Netlify Functions | Adapter work | Needs documented build output and runtime entry contracts. |
LessJS does not require a long-running production SSR server for its main path. Static pages should stay static; dynamic behavior should be explicit API or future ISR behavior. This keeps hosting cheap, cacheable and operationally small.