Skip to content

Releases: frandiox/vitedge

0.13.2

08 Jun 15:50
Compare
Choose a tag to compare
  • Fix: Skip props request in SSR when handler is missing. Fixes #33

0.13.1

08 Jun 11:05
Compare
Choose a tag to compare
  • Update esbuild dependency to match vite@2.3.7. Fixes #31
  • Update vite-ssr dependency for minor fixes.

0.13.0

30 May 12:03
Compare
Choose a tag to compare

Features

  • API endpoints can now return a Fetch Response (e.g. return fetch('https://domain.com/resource') or return new Response('...'). This enables using the API as a proxy. The main way to return data is still using serializable objects such as return { data: { value: true } }.
  • Props requests during SPA are now more intelligent. If a handler for the current route is not found in the filesystem (<root>/functions/props/routeName.js), the request will be skipped. Previously, you had to provide route.meta.propsGetter: false manually to skip requests but this is not needed anymore.
  • Added CORS utilities (see docs).

Fixes

  • Worker types.

Breaking changes

  • When deploying to Node environments (e.g. Vercel), the request passed to the backend handlers (API and Props) is now a Fetch Request to make it similar to the development environment. The original Node's request is provided as rawRequest. --- CFW deployments are not affected.

0.12.1

27 May 16:17
Compare
Choose a tag to compare
  • Use experimental Node flag for file resolution without extension.
  • Bump vite-ssr to support React's styled-components.

0.12.0

17 May 15:21
Compare
Choose a tag to compare
  • Feat: Support for dynamic routes in API (URL parameters).
  • Feat: Specify a different SSR entry point in the CLI (vitedge [build|dev] --ssr path/entry.ts).
  • Feat: Pass options to Rollup build for functions in the plugin (plugins: [vitedge({ ... })]).

0.11.0

16 Apr 13:58
Compare
Choose a tag to compare
  • Props/API handlers can now return status and statusText at the top level (before they had to be wrapped in options).
  • Support redirects from props handlers by just returning a 3xx status code and a Location header.
  • Errors thrown in props/API handlers are automatically parsed as JSON responses and passed to page components as props.
  • Provided a set of common error constructors (e.g. throw new BadRequestError('yikes', { inputs: ['email'] })) and a way to extend them.

0.10.5

10 Apr 17:29
Compare
Choose a tag to compare
  • Use ESM for SSR build.
  • Use 'browser' field when importing from dependencies.

0.10.4

07 Apr 17:25
Compare
Choose a tag to compare
  • HMR for reloading page props when the file with the props handler is saved.

0.10.3

06 Apr 16:59
Compare
Choose a tag to compare

Vue

  • Fix: Reload page props when route parameters change (same route name, different params).

React

  • Fix: Remove usage of Suspense internally to avoid flickering while loading props.

0.10.2

03 Apr 18:27
Compare
Choose a tag to compare

React

  • Fix: Pass URL parameters to props getter #11 by @huygn .
  • Feat: Export a simple <ClientOnly> component.