Skip to content

Commit e5f1772

Browse files
ci: apply automated fixes
1 parent d5ab0b4 commit e5f1772

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

docs/start/framework/react/guide/static-prerendering.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,8 @@ All static paths will be prerendered, and seamlessly merge them with specified `
7575

7676
Routes with path parameters (e.g., `/users/$userId`) are excluded from automatic discovery since they require specific parameter values to be prerendered.
7777

78-
7978
## Crawling Links
8079

8180
Prerender the pages link the prerendered pages
8281

8382
if `/` --has link to--> `/posts`, `/posts` will also be prerendered
84-
85-
86-

packages/start-plugin-core/src/prerender.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,20 @@ export async function prerender({
2323

2424
// If prerender is enabled
2525
if (startConfig.prerender?.enabled) {
26-
2726
// default to root page if no pages are defined
28-
let pages = startConfig.pages.length ? startConfig.pages : [{path: '/'}]
27+
let pages = startConfig.pages.length ? startConfig.pages : [{ path: '/' }]
2928

3029
if (startConfig.prerender.autoStaticPathsDiscovery ?? true) {
31-
3230
// merge discovered static pages with user-defined pages
33-
const pagesMap = new Map(pages.map(item => [item.path, item]));
31+
const pagesMap = new Map(pages.map((item) => [item.path, item]))
3432

3533
for (const page of globalThis.TSS_PRERENDABLE_PATHS) {
3634
if (!pagesMap.has(page.path)) {
37-
pagesMap.set(page.path, page);
35+
pagesMap.set(page.path, page)
3836
}
3937
}
4038

41-
pages = Array.from(pagesMap.values());
39+
pages = Array.from(pagesMap.values())
4240
}
4341

4442
startConfig.pages = pages

0 commit comments

Comments
 (0)