Packages

@astrojs/netlify

8.2.14 · 13 Nov 2026MIT71.2k / weekRepositoryHomepagenpmAtom feed

Your version

151 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.

  1. 3.x
  2. 3.0.2

    25 Sep 2023
    • Fix build failures because of CJS builds and top-level await

  3. 3.0.1

    1 Sep 2023
    • Update README

  4. 3.0.0

    30 Aug 2023
    • Breaking

      Remove support for Node 16. The lowest supported version by Astro and all integrations is now v18.14.1. As a reminder, Node 16 will be deprecated on the 11th September 2023.

    • Breaking

      Astro 3.0 Release Candidate

    • Breaking

      When using an adapter that supports neither Squoosh or Sharp, Astro will now automatically use an image service that does not support processing, but still provides the other benefits of astro:assets such as enforcing alt, no CLS etc to users

  5. 2.x
  6. 2.6.0

    11 Aug 2023
    • If you are using Netlify's On-demand Builders, you can now specify how long your pages should remain cached. By default, all pages will be rendered on first visit and reused on every subsequent visit until a redeploy. To set a custom revalidation time, call the runtime.setBuildersTtl() local in either your frontmatter or middleware.

      ---
      import Layout from '../components/Layout.astro';
      
      if (import.meta.env.PROD) {
        // revalidates every 45 seconds
        Astro.locals.runtime.setBuildersTtl(45);
      }
      ---
      
      <Layout title="Astro on Netlify">
        {new Date(Date.now())}
      </Layout>
  7. 2.5.2

    1 Aug 2023
    • Fix README GitHub search link

    • Improve 404 behavior for serverless and edge

  8. 2.5.1

    27 Jul 2023
    • Prevent building .html file redirects in hybrid mode

  9. 2.5.0

    19 Jul 2023
  10. 2.4.0

    13 Jul 2023
    • 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,
        },
      });
  11. 2.3.0

    6 Jun 2023
    • Support for experimental redirects

      This adds support for the redirects RFC in the Netlify adapter, including a new @astrojs/netlify/static adapter for static sites.

      No changes are necessary when using SSR. Simply use configured redirects and the adapter will update your _redirects file.

    • Unflags support for output: 'hybrid' mode, which enables pre-rendering by default. The additional experimental.hybridOutput flag can be safely removed from your configuration.

  12. 2.2.3

    18 May 2023
    • Enable experimental support for hybrid SSR with pre-rendering enabled by default

      astro.config.mjs

      import { defineConfig } from 'astro/config';
      export defaultdefineConfig({
         output: 'hybrid',
             experimental: {
             hybridOutput: true,
         },
      })

      Then add export const prerender = false to 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>
    • Specify "files" field to only publish necessary files

  13. 2.2.2

    10 Apr 2023
    • No edge functions deployed to netlify

  14. 2.2.1

    7 Apr 2023
    • Use Deno API to set Astro.clientAddress in Netlify Edge

  15. 2.2.0

    7 Mar 2023
    • Updated compilation settings to disable downlevelling for Node 14

  16. 2.1.3

    23 Feb 2023
    • Security

      Updated Undici to 5.20.0. This fixes a security issue and handling of cookies in certain cases in dev

    • Use .mjs extension when building to support CJS environments

  17. 2.1.2

    7 Feb 2023
    • Fix polyfills not being available in certain cases

  18. 2.1.1

    1 Feb 2023
    • Fix Netlify Function regression

  19. 2.1.0

    30 Jan 2023
    • Add builders config option for Netlify On-demand Builders.

  20. 2.0.0

    24 Jan 2023
    • Breaking

      & #5842 c4b0cb8bf Thanks @wulinsheng123 and @natemoo-re! - Breaking Change: client assets are built to an _astro directory in the build output directory. Previously these were built to various locations, including assets/, chunks/ and the root of build output.

      You can control this location with the new build configuration option named assets.

    • Breaking

      Remove astro:build:start backwards compatibility code

    • Breaking

      Make astro a peerDependency of integrations

      This marks astro as a peerDependency of several packages that are already getting major version bumps. This is so we can more properly track the dependency between them and what version of Astro they are being used with.

  21. 1.x
  22. 1.3.0

    16 Dec 2022
    • Introduces the experimental Prerender API.

      Note
      This API is not yet stable and is subject to possible breaking changes!

      Usage

  23. 1.2.2

    8 Dec 2022
    • Update esbuild dependency

  24. 1.2.1

    8 Nov 2022
    • Fix environment variables usage in edge functions

  25. 1.2.0

    13 Oct 2022
    • New build configuration

      The ability to customize SSR build configuration more granularly is now available in Astro. You can now customize the output folder for server (the server code for SSR), client (your client-side JavaScript and assets), and serverEntry (the name of the entrypoint server module). Here are the defaults:

      import { defineConfig } from 'astro/config';
      
      export default defineConfig({
        output: 'server',
        build: {
          server: './dist/server/',
          client: './dist/client/',
          serverEntry: 'entry.mjs',
        },
      });

      These new configuration options are only supported in SSR mode and are ignored when building to SSG (a static site).

  26. 1.1.0

    29 Sep 2022
    • Adds the Astro.cookies API

      Astro.cookies is a new API for manipulating cookies in Astro components and API routes.

      In Astro components, the new Astro.cookies object is a map-like object that allows you to get, set, delete, and check for a cookie's existence (has):

      ---
      type Prefs = {
        darkMode: boolean;
      };
      
      Astro.cookies.set<Prefs>(
        'prefs',
        { darkMode: true },
        {
          expires: '1 month',
        }
      );
      
      const prefs = Astro.cookies.get<Prefs>('prefs').json();
      ---
      
      <body data-theme={prefs.darkMode ? 'dark' : 'light'}></body>

      Once you've set a cookie with Astro.cookies it will automatically be included in the outgoing response.

      This API is also available with the same functionality in API routes:

      export function post({ cookies }) {
        cookies.set('loggedIn', false);
      
        return new Response(null, {
          status: 302,
          headers: {
            Location: '/login',
          },
        });
      }

      See the RFC to learn more.

    • Add missing dependencies, support strict dependency installation (e.g. pnpm)

  27. 1.0.4

    20 Sep 2022
    • Fix processing of images in Netlify Functions

  28. 1.0.3

    13 Sep 2022
    • Fix route validation failures on Netlify Edge

  29. 1.0.2

    31 Aug 2022
  30. 1.0.1

    12 Aug 2022
    • Adds 404 routing logic to Netlify redirects file

  31. 1.0.0

    9 Aug 2022
    • Breaking

      Astro v1.0 is out! Read the official announcement post.

      No breaking changes. This package is now officially stable and compatible with astro@1.0.0!

  32. 0.5.x
  33. 0.5.0

    26 Jul 2022
    • New output configuration option

      This change introduces a new "output target" configuration option (output). Setting the output target lets you decide the format of your final build, either:

      If output is omitted from your config, the default value "static" will be used.

      When using the "server" output target, you must also include a runtime adapter via the adapter configuration. An adapter will adapt your final build to run on the deployed platform of your choice (Netlify, Vercel, Node.js, Deno, etc).

      To migrate: No action is required for most users. If you currently define an adapter, you will need to also add output: 'server' to your config file to make it explicit that you are building a server. Here is an example of what that change would look like for someone deploying to Netlify:

      import { defineConfig } from 'astro/config';
      import netlify from '@astrojs/netlify/functions';
      
      export default defineConfig({
        adapter: netlify(),
      + output: 'server',
      });
    • Support for 404 and 500 pages in SSR

    • Adds support for Astro.clientAddress

      The new Astro.clientAddress property allows you to get the IP address of the requested user.

      <div>Your address { Astro.clientAddress }</div>

      This property is only available when building for SSR, and only if the adapter you are using supports providing the IP address. If you attempt to access the property in a SSG app it will throw an error.

  34. 0.4.x
  35. 0.4.10

    12 Jul 2022
    • Integration README fixes

  36. 0.4.9

    9 Jul 2022
    • Small README fixes

    • Support adapters and third party packages

  37. 0.4.8

    30 Jun 2022
    • Update READMEs

  38. 0.4.7

    28 Jun 2022
    • Append shim to top of built file to avoid "can't read process of undefined" issues

  39. 0.4.6

    22 Jun 2022
    • Fix react dependencies to improve test reliability

  40. 0.4.5

    21 Jun 2022
    • "vpath" import error when building for netlify edge

  41. 0.4.4

    16 Jun 2022
    • Adds support for base64 encoded responses in Netlify Functions

  42. 0.4.3

    7 Jun 2022
    • Fixes Netlify Edge Function and Astro.glob

  43. 0.4.2

    2 Jun 2022
    • Alias from 'astro' imports to '@astro/types'
      Update Deno and Netlify integrations to handle vite.resolves.alias as an array

  44. 0.4.1

    25 May 2022

    Only updates a dependency:@astrojs/webapi 0.12.0

  45. 0.4.0

    17 May 2022
    • Updating out directories for Netlify Functions

    • Change out directories on dist and serverEntry

  46. 0.3.x
  47. 0.3.4

    12 May 2022
    • Create redirects file for netlify edge adapter

  48. 0.3.3

    26 Apr 2022
    • Netlify Edge: Forward requests for static assets

  49. 0.3.2

    21 Apr 2022
    • Allows using React.lazy, Suspense in SSR and with hydration

  50. 0.3.1

    19 Apr 2022
    • Outputs manifest.json in correct folder for Netlify Edge Functions

  51. 0.3.0

    19 Apr 2022
    • Adds support for Netlify Edge Functions

  52. 0.2.x
  53. 0.2.3

    13 Apr 2022
    • Fixes setting multiple cookies with the Netlify adapter

  54. 0.2.2

    12 Apr 2022
    • Make Netlify adapter actually append redirects

  55. 0.2.1

    11 Apr 2022
    • No changes.

  56. 0.2.0

    11 Apr 2022
    • Improve the Netlify adapter:

    • Add human-readable error when a site is not provided in your astro.config

    • Fixes dynamic routes in the Netlify adapter

  57. 0.1.x
  58. 0.1.0

    2 Apr 2022
    • Update config options to respect RFC0019

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.