Skip to content

Commit 2657e0a

Browse files
i18n(ko-KR): create fail-on-prerender-conflict.mdx (#12432)
Co-authored-by: Yan <[email protected]>
1 parent 685b885 commit 2657e0a

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
title: 실험적 사전 렌더링 충돌 오류
3+
sidebar:
4+
label: 사전 렌더링 충돌 오류
5+
i18nReady: true
6+
---
7+
8+
import Since from '~/components/Since.astro'
9+
10+
<p>
11+
12+
**타입:** `boolean`<br />
13+
**기본값:** `false`<br />
14+
<Since v="5.14.0" />
15+
</p>
16+
17+
빌드 과정에서 사전 렌더링 충돌 경고를 오류로 전환합니다.
18+
19+
Astro는 빌드 과정에서 동일한 출력 경로를 생성할 수 있는 여러 동적 라우트 간 충돌에 대해 경고합니다. 예를 들어 `/blog/[slug]``/blog/[...all]` 모두 `/blog/post-1` 경로를 사전 렌더링하려고 시도합니다. 이러한 경우 Astro는 충돌하는 경로에 대해 [가장 높은 우선순위의 라우트](/ko/guides/routing/#라우트-우선-순위)만 렌더링합니다. 이를 통해 사이트는 성공적으로 빌드되지만, 일부 페이지가 예상치 못한 라우트로 렌더링된다는 사실을 발견할 수 있습니다.
20+
21+
이 실험적 플래그가 설정되면, 빌드는 즉시 실패하며, 오류가 발생합니다. 이로 인해 라우팅 충돌을 즉시 해결해야 하며, Astro가 라우트를 의도한 대로 빌드하도록 보장합니다.
22+
23+
이 동작을 활성화하려면 Astro 구성에 `experimental.failOnPrerenderConflict` 기능 플래그를 추가하세요.
24+
25+
```js title="astro.config.mjs" ins={4-6}
26+
import { defineConfig } from "astro/config"
27+
28+
defineConfig({
29+
experimental: {
30+
failOnPrerenderConflict: true,
31+
},
32+
});
33+
```
34+
35+
## 사용하기
36+
37+
이 플래그를 활성화한 후에는 프로젝트 빌드 시 사전 렌더링된 라우트 충돌에 대한 오류가 발생할 수 있습니다. 이 경우 모호한 라우팅을 방지하기 위해 하나 이상의 [동적 라우트](/ko/guides/routing/#동적-라우트)를 업데이트해야 합니다.

0 commit comments

Comments
 (0)