github withastro/astro @astrojs/cloudflare@13.0.0-beta.9

pre-release7 hours ago

Major Changes

  • #15435 957b9fe Thanks @rururux! - Changes the default image service from compile to cloudflare-binding. Image services options that resulted in broken images in development due to Node JS incompatiblities have now been updated to use the noop passthrough image service in dev mode. - (Cloudflare v13 and Astro6 upgrade guidance)

Minor Changes

  • #15435 957b9fe Thanks @rururux! - Adds support for configuring the image service as an object with separate build and runtime options

    It is now possible to set both a build-time and runtime service independently. Currently, 'compile' is the only available build time option. The supported runtime options are 'passthrough' (default) and 'cloudflare-binding':

    import { defineConfig } from 'astro/config';
    import cloudflare from '@astrojs/cloudflare';
    
    export default defineConfig({
      adapter: cloudflare({
        imageService: { build: 'compile', runtime: 'cloudflare-binding' },
      }),
    });

    See the Cloudflare adapter imageService docs for more information about configuring your image service.

  • #15556 8fb329b Thanks @florian-lefebvre! - Adds support for more @cloudflare/vite-plugin options

    The adapter now accepts the following options from Cloudflare's Vite plugin:

    • auxiliaryWorkers
    • configPath
    • inspectorPort
    • persistState
    • remoteBindings
    • experimental.headersAndRedirectsDevModeSupport

    For example, you can now set inspectorPort to provide a custom port for debugging your Workers:

    // astro.config.mjs
    import { defineConfig } from 'astro/config';
    import cloudflare from '@astrojs/cloudflare';
    
    export default defineConfig({
      adapter: cloudflare({
        inspectorPort: 3456,
      }),
    });

Patch Changes

  • #15565 30cd6db Thanks @ematipico! - Fixes an issue where the use of the Code component would result in an unexpected error.

  • #15588 425ea16 Thanks @rururux! - Fixes an issue where esbuild would throw a "Top-level return cannot be used inside an ECMAScript module" error during dependency scanning in certain environments.

  • #15636 5ecd04c Thanks @florian-lefebvre! - Adds an error when running on Stackblitz, since workerd doesn't support it

  • Updated dependencies []:

    • @astrojs/underscore-redirects@1.0.0

Don't miss a new astro release

NewReleases is sending notifications on new releases.