Server Loaders and Actions
- Previous iterations of loading data recommended using request handlers directly.
- The server loaders/action updates simplifies the connection between fetching data, rendering data, and submitting an update with an action.
- See the docs for more information.
Request Handlers
- Added
html()
json()
text()
and send()
for simple HTTP response body content.
- Added
getWritableStream()
to the Request event for low-level access to HTTP response streaming.
- Request event’s
query
is now a URLSearchParam
instance (same as url.searchParams
)
- Added
cacheControl
to simplify cache-control response headers.
Renamed Adaptors🇬🇧
to Adapters🇺🇸
- Renamed to adapt
e
r for consistency. (No offense 🇬🇧, we still love ya)
- The adapt
o
r name is deprecated and will continue to be provided until v1 is released.
- This includes the package names, function names, and types.
- Rename your root
adaptors
directory to adapters
, and update the scripts in package.json
that call the Vite configs, such as build.server
.
"scripts": {
"build.server": "vite build -c adapters/static/vite.config.ts"
}
Static Site Generation (SSG) and SSR Adapters
- When building sites with server-side rendering (SSR), such as deploying a site to Netlify or Cloudflare, we also automatically generated pages that could be static. This was problematic and caused unpredictable behavior at times.
- Instead of auto-generating SSG pages, there’s a new
ssg
config for each adapter where you can optionally include (and exclude) pathnames and patterns which urls should always be static generated.
- Static Site Generation from SSR Adapters is now opt-in, but starters will come preset with the homepage
/
included to be SSG’d.
// example adapter plugin
netifyEdgeAdapter({
ssg: {
include: ["/"],
},
})
What's Changed
New Contributors
Full Changelog: https://github.com/BuilderIO/qwik/compare/v0.17.4...v0.17.5