Releases: withastro/astro
[email protected]
@astrojs/[email protected]
Patch Changes
-
#7621
2ddf34262
Thanks @ematipico! - Improve file detection of the middleware file handler -
Updated dependencies [
86e19c7cf
]:
@astrojs/[email protected]
Minor Changes
- #7615
f21357b69
Thanks @ematipico! - Refactor how the routes are passed.
@astrojs/[email protected]
Minor Changes
-
#7615
f21357b69
Thanks @ematipico! - The Netlify adapter builds to a single function by default. Astro 2.7 added support for splitting your build into separate entry points per page. If you use this configuration, the Netlify adapter will generate a separate function for each page. This can help reduce the size of each function so they are only bundling code used on that page.// astro.config.mjs import { defineConfig } from 'astro/config'; import netlify from '@astrojs/netlify/functions'; export default defineConfig({ output: 'server', adapter: netlify(), build: { split: true, }, });
Patch Changes
- Updated dependencies [
f21357b69
,86e19c7cf
]:- @astrojs/[email protected]
- [email protected]
@astrojs/[email protected]
Patch Changes
- Updated dependencies [
f21357b69
,86e19c7cf
]:- @astrojs/[email protected]
- [email protected]
[email protected]
Patch Changes
-
#7611
904921cbe
Thanks @bluwy! - Ignore content .json files prefixed with underscores (regression) -
#7618
3669e2d27
Thanks @ematipico! - Add a fallback label ifastro info
command can't determine the package manager used. -
#7620
831dfd151
Thanks @delucis! - Filter outastro
from integration peer dependencies when runningastro add
@astrojs/[email protected]
Minor Changes
- #6585
9807e4dc2
Thanks @kory-smith! - Adds the option to prefetch a link only when it is hovered or focused.
Patch Changes
- #7613
131c92279
Thanks @Yan-Thomas! - Update prefetch README filename syntax
@astrojs/[email protected]
Patch Changes
-
#7593
c135633bf
Thanks @bholmesdev! - Add a documentation link to the configuration error hint for those migration pre-v0.4.0 config to the latest version. -
#7599
8df6a423c
Thanks @bholmesdev! - Fix hyphens in Markdoc tag names causing build failures
[email protected]
Patch Changes
- #7580
2ca5bdde2
Thanks @sankethchebbi! - Update dependency installation grammar
[email protected]
Minor Changes
-
#7532
9e5fafa2b
Thanks @ematipico! - Theastro/middleware
module exports a new utility calledtrySerializeLocals
.This utility can be used by adapters to validate their
locals
before sending it
to the Astro middleware.This function will throw a runtime error if the value passed is not serializable, so
consumers will need to handle that error. -
#7532
9e5fafa2b
Thanks @ematipico! - Astro exposes the middleware file path to the integrations in the hookastro:build:ssr
// myIntegration.js import type { AstroIntegration } from 'astro'; function integration(): AstroIntegration { return { name: 'fancy-astro-integration', hooks: { 'astro:build:ssr': ({ middlewareEntryPoint }) => { if (middlewareEntryPoint) { // do some operations } }, }, }; }
The
middlewareEntryPoint
is only defined if the user has created an Astro middleware. -
#7432
6e9c29579
Thanks @ematipico! - Adds a new commandastro info
, useful for sharing debugging information about your current environment when you need help!astro info
Output
Astro version v2.6.6 Package manager pnpm Platform darwin Architecture arm64 Adapter @astrojs/vercel/serverless Integrations None
-
#7532
9e5fafa2b
Thanks @ematipico! - Theastro/middleware
module exports a new API calledcreateContext
.This a low-level API that adapters can use to create a context that can be consumed by middleware functions.
-
#7532
9e5fafa2b
Thanks @ematipico! - Introduced a new build option for SSR, calledbuild.excludeMiddleware
.// astro.config.mjs import { defineConfig } from 'astro/config'; export default defineConfig({ build: { excludeMiddleware: true, }, });
When enabled, the code that belongs to be middleware won't be imported
by the final pages/entry points. The user is responsible for importing it and
calling it manually.
Patch Changes
- #7532
9e5fafa2b
Thanks @ematipico! - Correctly track the middleware during the SSR build.