File tree Expand file tree Collapse file tree 2 files changed +3
-11
lines changed
packages/start-plugin-core/src
start-router-plugin/generator-plugins Expand file tree Collapse file tree 2 files changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,6 @@ export async function prerender({
7070 pathToFileURL ( fullEntryFilePath ) . toString ( )
7171 )
7272
73-
7473 const isRedirectResponse = ( res : Response ) => {
7574 return res . status >= 300 && res . status < 400 && res . headers . get ( 'location' )
7675 }
@@ -82,10 +81,7 @@ export async function prerender({
8281 const url = new URL ( `http://localhost${ path } ` )
8382 const response = await serverEntrypoint . fetch ( new Request ( url , options ) )
8483
85- if (
86- isRedirectResponse ( response ) &&
87- maxRedirects > 0
88- ) {
84+ if ( isRedirectResponse ( response ) && maxRedirects > 0 ) {
8985 const location = response . headers . get ( 'location' ) !
9086 if ( location . startsWith ( 'http://localhost' ) || location . startsWith ( '/' ) ) {
9187 const newUrl = location . replace ( 'http://localhost' , '' )
@@ -294,5 +290,3 @@ export async function writeBundleToDisk({
294290 await fsp . writeFile ( fullPath , content )
295291 }
296292}
297-
298-
Original file line number Diff line number Diff line change 1-
21import { inferFullPath } from '@tanstack/router-generator'
3- import type { GeneratorPlugin , RouteNode } from '@tanstack/router-generator' ;
2+ import type { GeneratorPlugin , RouteNode } from '@tanstack/router-generator'
43
54/**
65 * this plugin gets the prerenderable paths and stores it on globalThis
@@ -15,7 +14,6 @@ export function prerenderRoutesPlugin(): GeneratorPlugin {
1514 }
1615}
1716
18-
1917function getPrerenderablePaths (
2018 routeNodes : Array < RouteNode > ,
2119) : Array < { path : string } > {
@@ -37,4 +35,4 @@ function getPrerenderablePaths(
3735 }
3836
3937 return Array . from ( paths ) . map ( ( path ) => ( { path } ) )
40- }
38+ }
You can’t perform that action at this time.
0 commit comments