create-croissant 0.1.20 → 0.1.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@ type Planet = Outputs["planets"]["getPlanets"][number]
|
|
|
10
10
|
export const Route = createFileRoute("/(public)/")({
|
|
11
11
|
loader: async () => {
|
|
12
12
|
const [helloRes, planets] = await Promise.all([
|
|
13
|
-
orpc.hello({ name: "
|
|
13
|
+
orpc.hello({ name: "Croissant Stack" }),
|
|
14
14
|
orpc.planets.getPlanets(),
|
|
15
15
|
])
|
|
16
16
|
return {
|
|
@@ -18,6 +18,9 @@ export const Route = createFileRoute("/(public)/")({
|
|
|
18
18
|
planets,
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
|
+
headers: () => ({
|
|
22
|
+
"Cache-Control": "public, max-age=10, s-maxage=10, stale-while-revalidate=60",
|
|
23
|
+
}),
|
|
21
24
|
component: App,
|
|
22
25
|
})
|
|
23
26
|
|
|
@@ -2,6 +2,9 @@ import { createFileRoute } from "@tanstack/react-router"
|
|
|
2
2
|
import { LoginForm } from "@/components/login-form"
|
|
3
3
|
|
|
4
4
|
export const Route = createFileRoute("/(public)/login")({
|
|
5
|
+
headers: () => ({
|
|
6
|
+
"Cache-Control": "public, max-age=3600, s-maxage=3600, stale-while-revalidate=86400",
|
|
7
|
+
}),
|
|
5
8
|
component: Login,
|
|
6
9
|
})
|
|
7
10
|
|
|
@@ -2,6 +2,9 @@ import { createFileRoute } from "@tanstack/react-router"
|
|
|
2
2
|
import { SignupForm } from "@/components/signup-form"
|
|
3
3
|
|
|
4
4
|
export const Route = createFileRoute("/(public)/signup")({
|
|
5
|
+
headers: () => ({
|
|
6
|
+
"Cache-Control": "public, max-age=3600, s-maxage=3600, stale-while-revalidate=86400",
|
|
7
|
+
}),
|
|
5
8
|
component: Signup,
|
|
6
9
|
})
|
|
7
10
|
|
|
@@ -10,7 +10,8 @@ const config = defineConfig({
|
|
|
10
10
|
tailwindcss(),
|
|
11
11
|
tanstackStart({
|
|
12
12
|
prerender: {
|
|
13
|
-
|
|
13
|
+
// In this version of TanStack Start, we use 'filter' to specify ISR routes
|
|
14
|
+
filter: ({ path }) => ["/", "/login", "/signup", "/examples/isr"].includes(path),
|
|
14
15
|
},
|
|
15
16
|
}),
|
|
16
17
|
viteReact(),
|