Skip to content
This repository has been archived by the owner on Nov 23, 2023. It is now read-only.

Releases: fastify/fastify-dx

[email protected]

30 Jun 23:46
1f058e7
Compare
Choose a tag to compare

This release fixes a bug where it was not possible to change the route context's state from within a route component and see the changes reflected in the hydration payload. Previously the only way to change state was via the default function in context.js.

The starter template's index.html also changed slightly, with hydration moved after element:

  <!DOCTYPE html>
  <html>
    <head>
      <meta charset="utf-8">
      <link rel="stylesheet" href="./base.css">
      <!-- head -->
-     <!-- hydration -->
    </head>
    <body>
      <main><!-- element --></main>
    </body>
+   <!-- hydration -->
    <script type="module" src="/dx:mount.js"></script>
  </html>

Note that currently only state and data are automatically hydrated.

Fixes

Examples

[email protected]

29 Jun 23:45
6c6104d
Compare
Choose a tag to compare

This release brings some important fixes and SSR performance improvements.

The starter template's index.html also changed slightly, with hydration moved after element:

  <!DOCTYPE html>
  <html>
    <head>
      <meta charset="utf-8">
      <link rel="stylesheet" href="./base.css">
      <!-- head -->
-     <!-- hydration -->
    </head>
    <body>
      <main><!-- element --></main>
    </body>
+   <!-- hydration -->
    <script type="module" src="/dx:mount.js"></script>
  </html>

This allows you to change the route context's state during the SSR phase and still see changes reflected on the global state hydration payload. Note that currently only state and data are automatically hydrated.

Fixes

Examples

[email protected]

27 Jun 06:27
3eb0a76
Compare
Choose a tag to compare

Welcome to Fastify DX for Solid!

Fastify DX for Solid is a renderer adapter for fastify-vite.

It lets you run and SSR (server-side render) Solid applications built with Vite on Fastify, with a minimal and transparent server-first approach — everything starts with server.js, your actual Fastify server.

It also provides a set of built-in utilities for ease of development and managing a universal JavaScript context (SSR to CSR), very much like Nuxt.js, Next.js and Remix. All Fastify DX framework adapters implement the URMA specification and have almost the same API, with only minimal differences due to specific framework APIs or idioms.

Please refer to the README for install and usage instructions.

This is the very first alpha release, but very few architectural or API changes are likely to take place before the first major release. This is a testing release, meant to provide a playground for early adopters willing to help find any lingering bugs.

Production use is not advised, but if you're brave enough, please file an issue describing your experience.

Known issues

This release is provided in ESM only. A CJS bundle will be part of the next release.

Sometimes you need to add things to ssr.external in vite.config.js.

There's no hot reload for the context.js file and the getData(), getMeta() and onEnter() hooks.

This will be fixed before the first major release.

You'll see the following message when running in development mode:

Sourcemap for "/dx:route.jsx" points to missing source files

They can be safely ignored.

[email protected]

26 Jun 10:11
Compare
Choose a tag to compare

[email protected]

24 Jun 01:58
6a325e4
Compare
Choose a tag to compare

Welcome to Fastify DX for Svelte!

Fastify DX for Svelte is a renderer adapter for fastify-vite.

It lets you run and SSR (server-side render) Svelte applications built with Vite on Fastify, with a minimal and transparent server-first approach — everything starts with server.js, your actual Fastify server.

It also provides a set of built-in utilities for ease of development and managing a universal JavaScript context (SSR to CSR), very much like Nuxt.js, Next.js and Remix. All Fastify DX framework adapters implement the URMA specification and have almost the same API, with only minimal differences due to specific framework APIs or idioms.

Please refer to the README for install and usage instructions.

This is the very first alpha release, but very few architectural or API changes are likely to take place before the first major release. This is a testing release, meant to provide a playground for early adopters willing to help find any lingering bugs.

Production use is not advised, but if you're brave enough, please file an issue describing your experience.

Known issues

This release is provided in ESM only. A CJS bundle will be part of the next release.

Sometimes you need to add things to ssr.external in vite.config.js.

There's no hot reload for the context.js file and the getData(), getMeta() and onEnter() hooks.

This will be fixed before the first major release.

You'll see the following message when running in development mode:

Sourcemap for "/dx:route.svelte" points to missing source files
[vite-plugin-svelte] /dx:route.svelte:78:32 Empty block

They can be safely ignored.

[email protected]

20 Jun 04:48
2cd88af
Compare
Choose a tag to compare

Welcome to Fastify DX for Vue!

Fastify DX for Vue is a renderer adapter for fastify-vite.

It lets you run and SSR (server-side render) Vue 3 applications built with Vite on Fastify, with a minimal and transparent server-first approach — everything starts with server.js, your actual Fastify server.

It also provides a set of built-in utilities for ease of development and managing a universal JavaScript context (SSR to CSR), very much like Nuxt.js, Next.js and Remix. Both Fastify DX for Vue and Fastify DX for React implement the URMA specification and have almost the same API, with only minimal differences due to specific framework APIs or idioms.

Please refer to the README for install and usage instructions.

This is the very first alpha release, but very few architectural or API changes are likely to take place before the first major release. This is a testing release, meant to provide a playground for early adopters willing to help find any lingering bugs.

Production use is not advised, but if you're brave enough, please file an issue describing your experience.

Known issues

This release is provided in ESM only. A CJS bundle will be part of the next release.

Sometimes you need to add things to ssr.external in vite.config.js.

There's no hot reload for the context.js file and the getData(), getMeta() and onEnter() hooks.

This will be fixed before the first major release.

You'll see the following message when running in development mode:

Sourcemap for "/dx:create.js" points to missing source files
Sourcemap for "/dx:core.js" points to missing source files

They can be safely ignored.

[email protected]

15 Jun 02:21
Compare
Choose a tag to compare

Fastify DX for React

A couple of important additions and some much needed internal refactoring.

New Features

  • New layout system — automatically load and assign layout components to routes.
  • New root.jsx file part of the starter template (and automatically provided as a virtual module if missing).

Breaking Changes

  • /dx:base.jsx has been renamed to /dx:create.jsx.
  • /dx:router.jsx has been renamed to /dx:core.jsx.

If you're using the starter template from v0.0.1, make sure to see through all these changes and copy over the new layouts/default.jsx and root.jsx files.

All known issues from the v0.0.1 release remain.

[email protected]

07 Jun 06:54
Compare
Choose a tag to compare

Welcome to Fastify DX for React!

Please refer to the README for install and usage instructions.

This is the very first alpha release, but very few architectural or API changes are likely to take place before the first major release. This is a testing release, meant to provide a playground for early adopters willing to help find any lingering bugs.

Production use is not advised, but if you're brave enough, please file an issue describing your experience.

Known issues

This release is provided in ESM only. A CJS bundle will be part of the next release.

Sometimes you need to add things to ssr.external in vite.config.js.

There's no hot reload for the context.js file and the getData(), getMeta() and onEnter() hooks.

This will be fixed before the first major release.

You'll see the following message when running in development mode:

Sourcemap for "/dx:base.jsx" points to missing source files
Sourcemap for "/dx:router.jsx" points to missing source files

They can be safely ignored.