Fresh 2.0 Graduates to Beta, Adds Vite Support
Fresh 2.0 enters beta after 63 alphas with a stable architecture, and its final major change is an optional Vite plugin built on Vite's Environment API. The plugin brings hot module reloading for island code and access to the Vite plugin ecosystem for server and client code. It also aliases react to preact/compat automatically. On-demand route loading plus server bundling cut production boot times 9–12×, with the Fresh website dropping from 86ms to 8ms. The <Head> component returns with a simpler, more efficient implementation.
Related posts
- Fresh 2.3: Zero JS by default, View Transitions, and Temporal support
Deno mediumAdeptFresh 2.3 now skips the client-entry bootstrap script entirely on pages that use no islands or partials, cutting static pages from roughly 5–9 KB gzipped JavaScript to zero with no configuration. It adds opt-in View Transitions wired into partial navigation, built-in WebSocket routes via app.ws() and ctx.upgrade(), CSP nonce and CIDR-based IP filter middleware, W3C traceparent injection for browser-side OpenTelemetry, Temporal types as island props, and trustProxy handling of X-Forwarded headers. Vite integration drops two Babel passes, fixes CJS and duplicate-Preact issues, and middleware chains are now precompiled at startup; upcoming work targets Vite 8 with Rolldown and build-time prerendering.
- Fresh 1.0
Deno mediumAdeptFresh is a full stack web framework for Deno that renders pages just-in-time on the server and ships zero JavaScript to the client by default, using the islands architecture so only explicitly opted-in components are hydrated in the browser. It uses Preact and JSX/TSX on both server and client, has file-system routing with handlers for custom responses and async data loading, and has no build step: TypeScript and JSX are transpiled on demand, so deployments are near-instant. Version 1.0 is declared production-ready and is well suited to edge runtimes such as Deno Deploy, Netlify Edge Functions and Supabase Edge Functions.
- Fresh 1.4 – Faster Page Loads, Layouts and More
Deno mediumAdeptFresh 1.4 adds optional ahead-of-time asset compilation via `deno task build`, which serves island assets roughly 45-60x faster on serverless cold starts than on-the-fly JIT compilation; a ~30kB search island that took 4.28s now revives near-instantly. The development server still uses JIT. The release also lets `_app.tsx` render the full html/head/body document, with a fallback to the old template when no html tag is rendered. New features include nested and async `_layout` files with opt-out config, `defineRoute`/`defineLayout`/`defineApp` typing helpers, parenthesized route groups that don't affect URLs, and private `(_components)` and `(_islands)` folders for colocating code.
- Fresh 1.5: Partials, client side navigation and more
Deno mediumAdeptFresh 1.5 introduces Partials, a client-side navigation model where marked regions of a page are swapped with server-rendered HTML without a full reload, preserving island state. Developers opt in with an f-client-nav attribute and <Partial name> wrappers, can point links at slimmed partial endpoints via f-partial, return multiple partials in one response, and choose replace, prepend or append merge modes. The release also adds automatic data-current/data-ancestor attributes for active link styling, configurable esbuild targets, an exposed esbuild metafile for bundle analysis, a new dev error overlay, automatic CSP nonces on inline scripts, and experimental buildStart/buildEnd plugin hooks.
- Fresh 1.2 – welcoming a full-time maintainer, sharing state between islands, limited npm support, and more
Deno mediumAdeptFresh 1.2 brings on Preact maintainer Marvin Hagemeister as full-time lead after a backlog of 60+ unreviewed PRs, and ships features centred on islands. Island props can now carry circular objects, Uint8Arrays and Preact Signals beyond plain JSON, which lets islands share state through a common signal. Islands also accept server-rendered JSX children, recovered from the HTML alone, and can nest, with inner islands treated as ordinary Preact components. Other additions include limited npm: specifier support (not yet on Deno Deploy), custom HEAD handlers, status and header overrides on ctx.render, island subdirectories, an async renderAsync plugin hook, and a createHandler helper for testing.