Skip to content
24 changes: 24 additions & 0 deletions src/content/docs/en/guides/upgrade-to/v6.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@

### Vite 7.0

<SourcePR number="14445" title="feat: update vite"/>

Astro v6.0 upgrades to Vite v7.0 as the development server and production bundler.

#### What should I do?
Expand Down Expand Up @@ -287,6 +289,8 @@

### Changed: `i18n.routing.redirectToDefaultLocale` default value

<SourcePR number="14406" title="feat(astro)!: update i18n.redirectToDefaultLocale default"/>

In Astro v5.0, the `i18n.routing.redirectToDefaultLocale` default value was `true`. When combined with the `i18n.routing.prefixDefaultLocale` default value of `false`, the resulting redirects could cause infinite loops.

In Astro v6.0, `i18n.routing.redirectToDefaultLocale` now defaults to `false`. Additionally, it can now only be used if `i18n.routing.prefixDefaultLocale` is set to `true`.
Expand All @@ -309,6 +313,26 @@
```

<ReadMore>Learn more about [Internationalization routing](/en/guides/internationalization/#routing).</ReadMore>
value

### Changed: endpoints with a file extension cannot be accessed with a trailing slash

<SourcePR number="14457" title="feat!: trailing slash never for endpoints with file extension"/>

In Astro v5.0, endpoints with a pathname ending with a file extension (eg. `/src/pages/sitemap.xml.ts`) could be accessed with a trailing slash (`/sitemap.xml/`) or without (`/sitemap.xml`), no matter the value of `build.trailingSlash`.

In Astro v6.0, these endpoints can only be accessed without a trailing slash.

#### What should I do?

Review your links and remove any referencing an endpoint ending witha file a file extension and a trailing slash:

```html del={1} ins={2} title="src/pages/index.astro"
<a href="/sitemap.xml/">Sitemap</a>
<a href="/sitemap.xml">Sitemap</a>
```

<ReadMore>Learn more about [`build.trailingSlash`](https://docs.astro.build/en/reference/configuration-reference/#trailingslash).</ReadMore>

Check failure on line 335 in src/content/docs/en/guides/upgrade-to/v6.mdx

View workflow job for this annotation

GitHub Actions / Check Links

Unwanted absolute link in src/content/docs/en/guides/upgrade-to/v6.mdx, line 335: https://docs.astro.build/en/reference/configuration-reference/#trailingslash Suggested fix: /en/reference/configuration-reference/#trailingslash

## Breaking Changes

Expand Down
Loading