Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions astro.sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ export const sidebar = [
'reference/experimental-flags/heading-id-compat',
'reference/experimental-flags/static-import-meta-env',
'reference/experimental-flags/chrome-devtools-workspace',
'reference/experimental-flags/fail-on-prerender-conflict',
],
}),
'reference/legacy-flags',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
title: Experimental prerender conflict error
sidebar:
label: Prerender conflict error
i18nReady: true
---

import Since from '~/components/Since.astro'

<p>

**Type:** `boolean`<br />
**Default:** `false`<br />
<Since v="5.14.0" />
</p>

Turns prerender conflict warnings into errors during the build process.

Multiple dynamic routes can result in the same output path; for example, both `/blog/[slug]` and `/blog/[...all]` could try to prerender the `/blog/post-1` path. In such cases, Astro will warn you about the conflict during build and render only the [highest priority route](/en/guides/routing/#route-priority-order) for the conflicting path. With this flag set, the build will instead fail immediately with an error.

This will be the default behavior in Astro 6.

Enable it in your `astro.config.mjs`:

```js
// astro.config.mjs
defineConfig({
experimental: {
failOnPrerenderConflict: true,
},
});
```
Loading