Astro: @astrojs/[email protected] Release

Release date:
August 19, 2024
Previous version:
@astrojs/[email protected] (released August 20, 2024)
Magnitude:
112 Diff Delta
Contributors:
2 total committers
Data confidence:
Commits:

Top Contributors in @astrojs/[email protected]

ematipico
sarah11918

Directory Browser for @astrojs/[email protected]

All files are compared to previous version, @astrojs/[email protected]. Click here to browse diffs between other versions.

Loading File Browser...

Release Notes Published

Major Changes

  • #11714 8a53517 Thanks @matthewp! - Remove support for functionPerRoute

    This change removes support for the functionPerRoute option both in Astro and @astrojs/vercel.

    This option made it so that each route got built as separate entrypoints so that they could be loaded as separate functions. The hope was that by doing this it would decrease the size of each function. However in practice routes use most of the same code, and increases in function size limitations made the potential upsides less important.

    Additionally there are downsides to functionPerRoute, such as hitting limits on the number of functions per project. The feature also never worked with some Astro features like i18n domains and request rewriting.

    Given this, the feature has been removed from Astro.

Minor Changes

  • #11728 5ea02b1 Thanks @matthewp! - 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,
      }),
    });
    

Patch Changes