Skip to content
Compare
Choose a tag to compare
@galvez galvez released this 19 Feb 08:14
· 171 commits to dev since this release

This is the first release for an experimental HTMX renderer for @fastify/vite, with JSX support provided via @kitajs/html.

This is currently the fastest SSR option for @fastify/vite.

Documentation and benchmarks will be added soon. For now here's a rundown of its features:

  • All route modules server-side rendered only.
    • But if they import *.css, *.svg and *.client.js files, these are also loaded on the client.
    • Head tags with prefetch tags are precomputed at boot time, leveraging Vite's ssr-manifest.json.
  • Route modules automatically loaded from /views folder, need to export path.
  • Route layout modules automatically loaded from /layouts folder.
  • Fragment route modules automatically loaded from /fragments folder.
    • Fragments are just endpoints that return raw HTML, without the <html> and <body> shells.
  • Tailwind and CSS Nesting enabled out of the box.

Play with the example in starters/htmx-kitchensink to learn more.

Screen Shot 2024-02-19 at 05 14 01