seigo2016
seigo2016
SSolidJS
Created by seigo2016 on 6/18/2024 in #support
How to make full static generation
Thank you so much! I will try it !
15 replies
SSolidJS
Created by seigo2016 on 6/18/2024 in #support
How to make full static generation
The generated HTML file contains the complete content of the CMS... However the client will still try to perform a fetch. (I found that reloading the page shows the content ....)
15 replies
SSolidJS
Created by seigo2016 on 6/18/2024 in #support
How to make full static generation
I forgot to mention the function call and the params. I am calling the fetch function as shown in the code below.
I use FileRoutes and get id from path params. By crawlLinks: true,option in app.config.ts, those pages seems prerendered properly. But I access these page the first time, I get the aforementioned error
// src/routes/posts/[...id].tsx
const params = useParams();
const [ post ] = createResource(params.id, fetchPost);
// src/routes/posts/[...id].tsx
const params = useParams();
const [ post ] = createResource(params.id, fetchPost);
//build log
[vinxi 1:58:05 PM] ℹ Prerendering 1 initial routes with crawler
[vinxi 1:58:05 PM] ├─ / (303ms)
[vinxi 1:58:05 PM] ├─ /posts (397ms)
[vinxi 1:58:06 PM] ├─ /tags (262ms)
[vinxi 1:58:06 PM] ├─ /posts/u-h63m00yhm9 (310ms)
[vinxi 1:58:06 PM] ├─ /posts/140rkamvv (183ms)
[vinxi 1:58:07 PM] ├─ /posts/xuaba1_3f1 (536ms)
...
//build log
[vinxi 1:58:05 PM] ℹ Prerendering 1 initial routes with crawler
[vinxi 1:58:05 PM] ├─ / (303ms)
[vinxi 1:58:05 PM] ├─ /posts (397ms)
[vinxi 1:58:06 PM] ├─ /tags (262ms)
[vinxi 1:58:06 PM] ├─ /posts/u-h63m00yhm9 (310ms)
[vinxi 1:58:06 PM] ├─ /posts/140rkamvv (183ms)
[vinxi 1:58:07 PM] ├─ /posts/xuaba1_3f1 (536ms)
...
15 replies