Skip to content

astro@2.7.0

Compare
Choose a tag to compare
@astrobot-houston astrobot-houston released this 22 Jun 14:09
· 2611 commits to main since this release
38b1040

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.