You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To allow the on-demand generation of pages based on an async operation (like a fetch from an external source) the extraData function should allow Promises or async.
I've just opened the PR.
I haven't found any tests for the onDemand plugin I could extend...
But I've tested it with and without extraData function async and Promises. Everything looks fine.
Enter your suggestions in details:
To allow the on-demand generation of pages based on an async operation (like a fetch from an external source) the
extraData
function should allow Promises or async.When I try this I get an internal server error:
marking the function as
async
also gives an error.I think an
await
in this line https://github1s.com/lumeland/lume/blob/main/middlewares/on_demand.ts#L42-L43could do the trick to allow for async
extraData
functions.The text was updated successfully, but these errors were encountered: