Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork1.4k
Feature: Prerender Images#6090
LandonSchropp started this conversation inIdeas
-
I'm building a personal static site that renders book covers based on dynamic content. In order to fetch the book cover images, I'm using theOpenLibrary API along with a custom file route. // src/routes/isbn/$isbn.tsimport{createFileRoute}from"@tanstack/react-router";exportconstRoute=createFileRoute("/isbn/$isbn")({server:{handlers:{GET:async({ params})=>{returnfetch(`https://covers.openlibrary.org/b/isbn/${params.isbn}-L.jpg`);},},},}); This works great in development mode, but fails when I pre-render the site ( |
BetaWas this translation helpful?Give feedback.
All reactions
Replies: 0 comments
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment