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. 6.x
  2. 6.5.3

    23 Jul 2025
    • Adds mock feature flags in dev

  3. 6.5.2

    21 Jul 2025
    • Upgrades Netlify Vite plugin to fix error in edge functions.

  4. 6.5.1

    16 Jul 2025
    • Fixes a bug that caused remote images to sometimes not display correctly when using the Netlify Image CDN in local dev

    • Adds a new devFeatures configuration option to control some of the behaviors introduced in @astrojs/netlify@6.5.0, which introduced Netlify production features into the dev environment.

      You can now individually configure whether or not to populate your environment with the variables from your linked Netlify site (now disabled by default), and use a local version of the Netlify Image CDN for images (still enabled by default) when running astro dev.

      Additionally, the adapter no longer injects environment variables from Netlify by default when running astro dev.

      @astrojs/netlify@6.5.0 introduced a potentially breaking change that enabled injecting Netlify environment variables in astro dev by default. This could lead to unexpected behavior in Astro projects that do not expect these variables to be present. This now defaults to disabled, and users can enable it by setting the devFeatures.environmentVariables option in their Astro config. Similarly, you can use devFeatures.images to disable using the Netlify Image CDN locally if needed:

      import { defineConfig } from 'astro/config';
      import netlify from '@astrojs/netlify';
      
      export default defineConfig({
        adapter: netlify({
          devFeatures: {
            environmentVariables: true,
            images: false,
          },
        }),
      });

      You can also set devFeatures to true or false to enable or disable all configurable dev features:

      import { defineConfig } from 'astro/config';
      import netlify from '@astrojs/netlify';
      export default defineConfig({
        adapter: netlify({
          devFeatures: true,
        }),
      });
  5. 6.5.0

    14 Jul 2025
    • Updates the adapter to use Netlify's Vite plugin in development.

  6. 6.4.1

    3 Jul 2025
    • Fixes the internal implementation of the new feature experimentalStaticHeaders, where dynamic routes
      were mapped to use always the same header.

  7. 6.4.0

    17 Jun 2025
    • Adds support for the experimental static headers Astro feature.

      When the feature is enabled via option experimentalStaticHeaders, and experimental Content Security Policy is enabled, the adapter will generate Response headers for static pages, which allows support for CSP directives that are not supported inside a <meta> tag (e.g. frame-ancestors).

      import { defineConfig } from 'astro/config';
      import netlify from '@astrojs/netlify';
      
      export default defineConfig({
        adapter: netlify({
          experimentalStaticHeaders: true,
        }),
        experimental: {
          cps: true,
        },
      });
  8. 6.3.4

    21 May 2025
    • Fixes an issue where the adapter didn't take into consideration the outDir configuration.

    • Fixes an issue with SVGs not rendering with image-cdn enabled, due to invalid source path parsing.

  9. 6.3.3

    13 May 2025
    • Unify imported images detection across adapters

  10. 6.3.2

    30 Apr 2025
    • Update vite to latest version for fixing CVE

  11. 6.3.1

    23 Apr 2025
    • Removes unused code

  12. 6.3.0

    15 Apr 2025
    • The experimental session API introduced in Astro 5.1 is now stable and ready for production use.

      Sessions are used to store user state between requests for on-demand rendered pages. You can use them to store user data, such as authentication tokens, shopping cart contents, or any other data that needs to persist across requests:

      ---
      export const prerender = false; // Not needed with 'server' output
      const cart = await Astro.session.get('cart');
      ---
      
      <a href="/checkout">🛒 {cart?.length ?? 0} items</a>
  13. 6.2.6

    14 Apr 2025
    • Update vite to latest version to fix CVE

    • Updates vite to the latest version

  14. 6.2.5

    31 Mar 2025
    • Update vite to the latest version

  15. 6.2.4

    26 Mar 2025
    • Updates the dependency vite to the latest.

  16. 6.2.2

    27 Feb 2025
    • Updates esbuild and vite to the latest to avoid false positives audits warnings caused by esbuild.

  17. 6.2.1

    24 Feb 2025
    • Uses tinyglobby for globbing files

  18. 6.2.0

    13 Feb 2025
    • Adds includedFiles and excludedFiles configuration options to customize SSR function bundle contents.

      The includeFiles property allows you to explicitly specify additional files that should be bundled with your function. This is useful for files that aren't automatically detected as dependencies, such as:

      Similarly, you can use the excludeFiles property to prevent specific files from being bundled that would otherwise be included. This is helpful for:

      import { defineConfig } from 'astro/config';
      import netlify from '@astrojs/netlify';
      
      export default defineConfig({
        // ...
        output: 'server',
        adapter: netlify({
          includeFiles: ['./my-data.json'],
          excludeFiles: ['./node_modules/package/**/*', './src/**/*.test.js'],
        }),
      });

      See the Netlify adapter documentation for detailed usage instructions and examples.

    • Automatically configures Netlify Blobs storage when experimental session enabled

      If the experimental.session flag is enabled when using the Netlify adapter, Astro will automatically configure the session storage using the Netlify Blobs driver. You can still manually configure the session storage if you need to use a different driver or want to customize the session storage configuration.

      See the experimental session docs for more information on configuring session storage.

  19. 6.1.0

    13 Jan 2025
    • Stabilizes astro:env secrets support

    • Improves Astro 5 support

    • Refactor of the redirects logic

  20. 6.0.1

    16 Dec 2024
    • Fixes an error where edge middleware would incorrectly assign locals

    • Correctly pass Netlify context in edge middleware

  21. 6.0.0

    3 Dec 2024
    • Breaking

      Removed support for the Squoosh image service. As the underlying library libsquoosh is no longer maintained, and the image service sees very little usage we have decided to remove it from Astro.

      Our recommendation is to use the base Sharp image service, which is more powerful, faster, and more actively maintained.

      - import { squooshImageService } from "astro/config";
      import { defineConfig } from "astro/config";
      
      export default defineConfig({
      -  image: {
      -    service: squooshImageService()
      -  }
      });

      If you are using this service, and cannot migrate to the base Sharp image service, a third-party extraction of the previous service is available here: github.com/Princesseuh/astro-image-service-squo…

    • Deprecated

      Deprecates the functionPerRoute option

      This option is now deprecated, and will be removed entirely in Astro v5.0. We suggest removing this option from your configuration as soon as you are able to:

      import { defineConfig } from 'astro/config';
      import vercel from '@astrojs/vercel/serverless';
      
      export default defineConfig({
        // ...
        output: 'server',
        adapter: vercel({
      -     functionPerRoute: true,
        }),
      });
    • Breaking

      Updates internal code to works with Astro 5 changes to hybrid rendering. No changes are necessary to your project, apart from using Astro 5

  22. 5.x
  23. 5.5.4

    17 Oct 2024
    • Fixes context.rewrite in edge middleware

  24. 5.5.3

    17 Sep 2024
    • Allows - in hostnames for Netlify Image CDN RegEx

  25. 5.5.2

    10 Sep 2024
    • Prevent crawling for dependencies outside of the workspace root

  26. 5.5.1

    15 Aug 2024
    • Apply polyfills immediately on function execution

      This moves up when the polyfills are applied so that they are present before Astro runs, preventing a race condition that can cause crypto to not be defined early enough in Node 18.

  27. 5.5.0

    3 Aug 2024
    • Sets immutable cache headers for static assets

  28. 5.4.0

    10 Jul 2024
    • Refactors the adapter to use the Netlify Frameworks API

    • Allows support for node: prefixed imports if using the Adapter with edgeMiddleware: true

  29. 5.3.5

    1 Jul 2024
    • Fixes a regression where edge middleware tried to bundle node builtins

  30. 5.3.4

    1 Jul 2024
    • Fixes an issue where files were not included in the SSR function when built in a monorepo

  31. 5.3.3

    27 Jun 2024
    • Improves performance for serverless function builds by not bundling dependencies

  32. 5.3.2

    20 Jun 2024
    • Fixes astro:env getSecret compatibility

  33. 5.3.1

    17 Jun 2024
    • Fixes backwards compatibility with Astro <= 4.9

  34. 5.3.0

    10 Jun 2024
    • Adds support for experimental astro:env released in Astro 4.10

  35. 5.2.1

    7 May 2024
    • Fixes an issue with edge middleware where process.env was not defined, by using a polyfill to shim it

  36. 5.2.0

    19 Mar 2024
    • Adds support for image.remotePatterns and images.domains with Netlify Image CDN

  37. 5.1.3

    26 Feb 2024
    • Fixes an issue where some astro CLI commands failed with crypto is not defined on Astro 4.4.0 and earlier.

  38. 5.1.2

    13 Feb 2024
    • Fixes an issue where enabling edgeMiddleware failed to bundle a dependency (cssesc) introduced in Astro 4.2.5.

  39. 5.1.1

    12 Feb 2024
    • Fixes bug where prerendered 404 pages were served as text/plain instead of text/html for hybrid/server apps, leading to browsers displaying source code instead of rendering it

  40. 5.1.0

    7 Feb 2024
    • Implements verification for edge middleware. This is a security measure to ensure that your serverless functions are only ever called by your edge middleware and not by a third party.

      When edgeMiddleware is enabled, the serverless function will now respond with 403 Forbidden for requests that are not verified to have come from the generated edge middleware. No user action is necessary.

  41. 5.0.1

    1 Feb 2024
    • Fixes a bug in the Netlify Adapter where prerendered 404.astro pages weren't shown on hybrid/server deployments.

  42. 5.0.0

    23 Jan 2024
    • Breaking

      Updates the internals of the integration to support Astro 4.0. See this upstream pull request for additional details. Warning: Make sure to upgrade your Astro version to >4.2 as previous versions are no longer supported.

  43. 4.x
  44. 4.1.1

    11 Jan 2024
    • Updates the behavior of the cacheOnDemandPages setting to only cache GET/HEAD requests by default

  45. 4.1.0

    3 Jan 2024
    • Adds opt-out option for Image CDN.

  46. 4.0.2

    28 Dec 2023
    • Updates Netlify README.md

  47. 4.0.1

    19 Dec 2023
    • Fix crash when reading package.json version field

  48. 4.0.0

    18 Dec 2023
    • Breaking

      Netlify Adapter v4 simplifies static + SSR deployments

      This update is a complete overhaul of the Netlify adapter. It simplifies the user-facing config, and resolves a number of bugs along the way.

      Here's what changes:

  49. 3.x
  50. 3.1.1

    7 Dec 2023

    Maintenance only: docs, tests, build or refactoring. Nothing changes in how you use it.

  51. 3.1.0

    6 Dec 2023
    • Fixes an issue where this package could not be installed alongside Astro 4.0.

  52. 3.0.4

    3 Nov 2023
    • Updates dependencies

  53. 3.0.3

    16 Oct 2023
    • Updates repository information

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.