openElement prioritizes static file deployment. Runtime API routes are deployed separately via serverless or edge adapters when the app needs dynamic behavior.
deno task buildThe build outputs dist/: static HTML with Declarative Shadow DOM, client island chunks, and copied public assets.
Set Vite base when deploying under a repo sub-path.
Build command: deno task build; Output dir: dist.
Publish directory: dist.
Use static output, Framework preset: "Other".
Upload dist/ with appropriate cache headers.
API routes belong to the generated Hono app. Static hosting doesn't execute them. Deploy API routes via platform adapters when runtime behavior is needed.
openElement's main path doesn't need a long-running production SSR server. Static pages stay static; dynamic behavior should be explicit API or future ISR. This keeps hosting cheap, cacheable, and operationally lightweight.
openElement supports Progressive Web Apps. Place your manifest and service worker in thepublic/ directory — they're automatically copied to the output during build. CSP meta and view transition metadata can be auto-injected via the Vite plugin.
// vite.config.ts
import { openElement } from '@openelement/app/vite';
export default defineConfig({
plugins: [openElement({
pwa: {
injectManifest: true,
},
})],
});