@astrojs/netlify
πΏ Minor Changes
-
#7700
a77741d25Thanks @delucis! - When a project uses the newbuild.excludeMiddlewareAstro config option, the@astrojs/netlify/functionsadapter will bundle your middleware to run in a Netlify Edge Function.See the Netlify adapter documentation for more details.
π Patch Changes
-
πΏ Minor Changes
-
#7615
f21357b69Thanks @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
-
πΏ Minor Changes
-
#7067
57f8d14c0Thanks @matthewp! - Support for experimental redirectsThis adds support for the redirects RFC in the Netlify adapter, including a new
@astrojs/netlify/staticadapter for static sites.No changes are necessary when using SSR. Simply use configured redirects and the adapter will update your
_redirectsfile.
π Patch Changes
-
#7260
39403c32fThanks @natemoo-re! - Unflags support foroutput: 'hybrid'mode, which enables pre-rendering by default. The additionalexperimental.hybridOutputflag can be safely removed from your configuration. -
Updated dependencies [
57f8d14c0,414eb19d2,a7e2b37ff,dd1a6b6c9,d72cfa7ca,144813f73,b5213654b,e3b8c6296,890a2bc98,39403c32f,101f03209]:- astro@2.6.0
-
π Patch Changes
-
#6991
719002ca5Thanks @MoustaphaDev! - Enable experimental support for hybrid SSR with pre-rendering enabled by defaultastro.config.mjs
import { defineConfig } from 'astro/config';export defaultdefineConfig({output: 'hybrid',experimental: {hybridOutput: true,},})Then add
export const prerender = falseto any page or endpoint you want to opt-out of pre-rendering.src/pages/contact.astro
---export const prerender = false;if (Astro.request.method === 'POST') {// handle form submission}---<form method="POST"><input type="text" name="name" /><input type="email" name="email" /><button type="submit">Submit</button></form> -
#7104
826e02890Thanks @bluwy! - Specify"files"field to only publish necessary files -
Updated dependencies [
4516d7b22,e186ecc5e,c6d7ebefd,914c439bc,e9fc2c221,075eee08f,719002ca5,fc52681ba,fb84622af,cada10a46,cd410c5eb,73ec6f6c1,410428672,763ff2d1e,c1669c001,3d525efc9]:- astro@2.5.0
-
π Patch Changes
- #6793
1e3873c04Thanks @andremralves! - fix: no edge functions deployed to netlify
- #6793
π Patch Changes
-
#6323
5e26bc891Thanks @Princesseuh! - Updated Undici to 5.20.0. This fixes a security issue and handling of cookies in certain cases in dev -
#6317
2eb73cb9dThanks @bluwy! - Use .mjs extension when building to support CJS environments -
Updated dependencies [
5e26bc891,a156ecbb7,ccd72e6bb,504c7bacb,63dda6ded,f91a7f376]:- astro@2.0.15
-
β¨ Major Changes
-
#5584
9963c6e4d& #5842c4b0cb8bfThanks @wulinsheng123 and @natemoo-re! - Breaking Change: client assets are built to an_astrodirectory in the build output directory. Previously these were built to various locations, includingassets/,chunks/and the root of build output.You can control this location with the new
buildconfiguration option namedassets. -
#5707
5eba34fccThanks @bluwy! - Removeastro:build:startbackwards compatibility code -
#5806
7572f7402Thanks @matthewp! - Make astro a peerDependency of integrationsThis marks
astroas a peerDependency of several packages that are already gettingmajorversion bumps. This is so we can more properly track the dependency between them and what version of Astro they are being used with.
π Patch Changes
-
#5768
2f6745019Thanks @Princesseuh! - Fix set-cookies not working in certain cases when using Node 18+ -
#5904
f5adbd6b5Thanks @matthewp! - Support prerender in _redirects -
#5885
8f1ae06e5Thanks @natemoo-re! - Fix issue with prerendered pages when usingedge-functionsadapter -
Updated dependencies [
93e633922,16dc36a87,01f3f463b,e2019be6f,05caf445d,49ab4f231,a342a486c,8fb28648f,1f92d64ea,c2180746b,ae8a012a7,cf2de5422,ce5c5dbd4,ec09bb664,665a2c222,259a539d7,f7aa1ec25,4987d6f44,304823811,302e0ef8f,55cea0a9d,dd56c1941,9963c6e4d,46ecd5de3,be901dc98,f6cf92b48,e818cc046,8c100a6fe,116d8835c,840412128,1f49cddf9,7325df412,16c7d0bfd,c55fbcb8e,a9c292026,2a5786419,4a1cabfe6,a8d3e7924,fa8c131f8,64b8082e7,c4b0cb8bf,1f92d64ea,23dc9ea96,63a6ceb38,a3a7fc929,52209ca2a,5fd9208d4,5eba34fcc,899214298,3a00ecb3e,5eba34fcc,2303f9514,1ca81c16b,b66d7195c]:- astro@2.0.0
- @astrojs/webapi@2.0.0
-
β¨ Major Changes
-
#5842
c4b0cb8bfThanks @natemoo-re! - Breaking Change: client assets are built to an_astrodirectory in the build output directory. Previously these were built to various locations, includingassets/,chunks/and the root of build output.You can control this location with the new
buildconfiguration option namedassets. -
#5806
7572f7402Thanks @matthewp! - Make astro a peerDependency of integrationsThis marks
astroas a peerDependency of several packages that are already gettingmajorversion bumps. This is so we can more properly track the dependency between them and what version of Astro they are being used with.
π Patch Changes
-
β¨ Major Changes
- #5584
9963c6e4dThanks @wulinsheng123! - Builds chunks into theassetsfolder. This simplifies configuring immutable caching with your adapter provider as all files are now in the sameassetsfolder.
π Patch Changes
- #5768
2f6745019Thanks @Princesseuh! - Fix set-cookies not working in certain cases when using Node 18+
- #5584
πΏ Minor Changes
-
#5297
d2960984cThanks @natemoo-re! - Introduces the experimental Prerender API.Note This API is not yet stable and is subject to possible breaking changes!
- Deploy an Astro server without sacrificing the speed or cacheability of static HTML.
- The Prerender API allows you to statically prerender specific
pages/at build time.
Usage
- First, run
astro build --experimental-prerenderor enableexperimental: { prerender: true }in yourastro.config.mjsfile. - Then, include
export const prerender = truein any file in thepages/directory that you wish to prerender.
-