Aller au contenu
verdict:

Astro 6.4.0

notable

note: la synthèse et les notes de version sont en anglais

note: pas de synthèse pour cette release plus ancienne

Nous synthétisons les releases récentes. Les notes de version originales de cette version sont ci-dessous.

release-notesgithub.com/withastro/astro · 102 lignes
  1. ### Minor Changes
  2. - [#16468](https://github.com/withastro/astro/pull/16468) [`4cff3a1`](https://github.com/withastro/astro/commit/4cff3a107c3750ab5f0878a6b41836705282b771) Thanks [@matthewp](https://github.com/matthewp)! - Adds a new `preserveBuildServerDir` adapter feature
  3. Adapters can now set `preserveBuildServerDir: true` in their adapter features to keep the `dist/server/` directory structure for static builds, mirroring the existing `preserveBuildClientDir` option. This is useful for adapters that require a consistent `dist/client/` and `dist/server/` layout regardless of build output type.
  4. ```js
  5. setAdapter({
  6. name: 'my-adapter',
  7. adapterFeatures: {
  8. buildOutput,
  9. preserveBuildClientDir: true,
  10. preserveBuildServerDir: true,
  11. },
  12. });
  13. ```
  14. - [#16848](https://github.com/withastro/astro/pull/16848) [`f732f3c`](https://github.com/withastro/astro/commit/f732f3cc716342a63e5b03815243ba10964b89dc) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Adds a new `markdown.processor` configuration option, allowing you to choose an alternative Markdown processor.
  15. Websites with many Markdown/MDX files tend to be slow to build because the unified ecosystem (e.g., remark, rehype) is slow to process. This feature introduces the ability to replace this part of the build pipeline with another processor.
  16. The default processor is `unified()`. This means that existing configurations remain unchanged and your remark/rehype plugins continue to work.
  17. ```js
  18. // astro.config.mjs
  19. import { defineConfig } from 'astro/config';
  20. import { unified } from '@astrojs/markdown-remark';
  21. import remarkToc from 'remark-toc';
  22. export default defineConfig({
  23. markdown: {
  24. processor: unified({
  25. remarkPlugins: [remarkToc],
  26. }),
  27. },
  28. });
  29. ```
  30. In addition to this new configuration option, Astro provides a new alternative processor based on Rust: [Sätteri](https://satteri.bruits.org/). You can choose to use it now by installing `@astrojs/markdown-satteri`, importing the `satteri()` processor, and adapting your existing configuration:
  31. ```js
  32. // astro.config.mjs
  33. import { defineConfig } from 'astro/config';
  34. import { satteri } from '@astrojs/markdown-satteri';
  35. export default defineConfig({
  36. markdown: {
  37. processor: satteri({
  38. features: { directive: true },
  39. }),
  40. },
  41. });
  42. ```
  43. This processor does not support the remark and rehype plugins. This means you may need to convert them to [MDAST or HAST plugins](https://satteri.bruits.org/docs/plugins/) to retain your current functionality.
  44. The existing top-level `markdown.remarkPlugins`, `markdown.rehypePlugins`, `markdown.remarkRehype`, `markdown.gfm`, and `markdown.smartypants` options still work, but are now deprecated and will be removed in a future major update. The matching `remarkPlugins`, `rehypePlugins`, and `remarkRehype` options on the MDX integration are also deprecated for the same reason. To anticipate their removal, move them onto `unified({...})` (or your preferred plugin processor) :
  45. ```diff
  46. // astro.config.mjs
  47. import { defineConfig } from 'astro/config';
  48. import remarkToc from 'remark-toc';
  49. import rehypeSlug from 'rehype-slug';
  50. + import { unified } from '@astrojs/markdown-remark';
  51. export default defineConfig({
  52. markdown: {
  53. + processor: unified({
  54. + remarkPlugins: [remarkToc],
  55. + rehypePlugins: [rehypeSlug],
  56. + remarkRehype: true,
  57. + gfm: true,
  58. + smartypants: true,
  59. + }),
  60. - remarkPlugins: [remarkToc],
  61. - rehypePlugins: [rehypeSlug],
  62. - remarkRehype: true,
  63. - gfm: true,
  64. - smartypants: true,
  65. },
  66. });
  67. ```
  68. For more information on enabling and using this feature in your project, see our [Markdown guide](https://docs.astro.build/en/guides/markdown-content/). To give feedback on this new Rust processor, see the [Native Markdown / MDX parsing and processing RFC](https://github.com/withastro/roadmap/pull/1364).
  69. ### Patch Changes
  70. - [#16468](https://github.com/withastro/astro/pull/16468) [`4cff3a1`](https://github.com/withastro/astro/commit/4cff3a107c3750ab5f0878a6b41836705282b771) Thanks [@matthewp](https://github.com/matthewp)! - Skips the static preview server when an adapter provides its own `previewEntrypoint`, allowing the adapter to handle both static and dynamic routes
  71. - [#16811](https://github.com/withastro/astro/pull/16811) [`e0e26db`](https://github.com/withastro/astro/commit/e0e26dbfe95f9d42f51ad414dbe877e60cbc637d) Thanks [@matthewp](https://github.com/matthewp)! - Fixes `X-Forwarded-Host` and `X-Forwarded-Proto` headers being ignored when set in a custom `src/app.ts` fetch handler before creating `FetchState`
  72. - [#16468](https://github.com/withastro/astro/pull/16468) [`4cff3a1`](https://github.com/withastro/astro/commit/4cff3a107c3750ab5f0878a6b41836705282b771) Thanks [@matthewp](https://github.com/matthewp)! - Fixes the static preview server to respect `preserveBuildClientDir`, serving files from `build.client` instead of `outDir` when the adapter requires it
  73. - [#16770](https://github.com/withastro/astro/pull/16770) [`1e2aa11`](https://github.com/withastro/astro/commit/1e2aa11caf8e7a48f37dd614fd2d4c15cc7a8439) Thanks [@matthewp](https://github.com/matthewp)! - Fixes a race condition where the Vite dep optimizer could lose React dependencies in dev mode when using Astro Actions
  74. - [#16468](https://github.com/withastro/astro/pull/16468) [`4cff3a1`](https://github.com/withastro/astro/commit/4cff3a107c3750ab5f0878a6b41836705282b771) Thanks [@matthewp](https://github.com/matthewp)! - Exempts internal routes (e.g. server islands) from `getStaticPaths()` validation, fixing server island rendering on static sites
  75. - [#16468](https://github.com/withastro/astro/pull/16468) [`4cff3a1`](https://github.com/withastro/astro/commit/4cff3a107c3750ab5f0878a6b41836705282b771) Thanks [@matthewp](https://github.com/matthewp)! - Fixes preview for static sites that contain non-prerendered routes. Previously, the preview command ignored SSR routes discovered during route scanning and always used the static preview server.
  76. - Updated dependencies [[`f732f3c`](https://github.com/withastro/astro/commit/f732f3cc716342a63e5b03815243ba10964b89dc), [`f732f3c`](https://github.com/withastro/astro/commit/f732f3cc716342a63e5b03815243ba10964b89dc)]:
  77. - @astrojs/internal-helpers@0.10.0
  78. - @astrojs/markdown-remark@7.2.0

voir sur githubimported 2026-09-28 via npm