github withastro/astro @astrojs/netlify@6.5.1

one month ago

Patch Changes

  • #14078 38c2255 Thanks @ascorbic! - Fixes a bug that caused remote images to sometimes not display correctly when using the Netlify Image CDN in local dev

  • #14078 38c2255 Thanks @ascorbic! - 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,
      }),
    });
  • Updated dependencies []:

    • @astrojs/underscore-redirects@1.0.0

Don't miss a new astro release

NewReleases is sending notifications on new releases.