github withastro/astro astro@2.7.0

latest releases: astro@5.0.0-beta.8, astro@4.16.12, astro@4.16.11...
17 months ago

Minor Changes

  • #7353 76fcdb84d Thanks @bholmesdev! - Remove legacy handling for MDX content collections. Ensure you are using @astrojs/mdx v0.18 or above.

  • #7385 8e2923cc6 Thanks @ematipico! - Astro.locals is now exposed to the adapter API. Node Adapter can now pass in a locals object in the SSR handler middleware.

  • #7220 459b5bd05 Thanks @ematipico! - Shipped a new SSR build configuration mode: split.
    When enabled, Astro will "split" the single entry.mjs file and instead emit a separate file to render each individual page during the build process.

    These files will be emitted inside dist/pages, mirroring the directory structure of your page files in src/pages/, for example:

    ├── pages
    │   ├── blog
    │   │   ├── entry._slug_.astro.mjs
    │   │   └── entry.about.astro.mjs
    │   └── entry.index.astro.mjs
    

    To enable, set build.split: true in your Astro config:

    // src/astro.config.mjs
    export default defineConfig({
      output: 'server',
      adapter: node({
        mode: 'standalone',
      }),
      build: {
        split: true,
      },
    });

Patch Changes

  • #7438 30bb36371 Thanks @bluwy! - Fix astro:build:setup hook updateConfig utility, where the configuration wasn't correctly updated when the hook was fired.

  • #7436 3943fa390 Thanks @kossidts! - Fix an issue related to the documentation. Destructure the argument of the function to customize the Astro dev server based on the command run.

  • #7424 7877a06d8 Thanks @bholmesdev! - Update internal types for more stable builds for Astro maintainers.

  • #7427 e314a04bf Thanks @ematipico! - Correctly emit the middleware code during the build phase. The file emitted is now dist/middleware.mjs

  • #7423 33cdc8622 Thanks @bmenant! - Ensure injected /_image endpoint for image optimization is not prerendered on hybrid output.

Don't miss a new astro release

NewReleases is sending notifications on new releases.