issue/fetch #21
@ -164,7 +164,7 @@ export type FetchRecord = {URL:string, CacheFor:number, CachedAt:number, CacheOn
|
||||
export const Fetch = {
|
||||
Cache:new Map() as Map<string, FetchRecord>,
|
||||
ServerBlocking:false as false|Promise<FetchRecord>[],
|
||||
ServerTouched:new Set() as Set<FetchRecord>,
|
||||
ServerTouched:false as false|Set<FetchRecord>,
|
||||
Seed(seed:FetchRecord[])
|
||||
{
|
||||
seed.forEach(r=>{
|
||||
|
@ -222,6 +222,7 @@ FileListen("${url.pathname}", reloadHandler);`;
|
||||
else
|
||||
{
|
||||
Iso.Fetch.ServerBlocking = [];
|
||||
Iso.Fetch.ServerTouched = new Set();
|
||||
let bake = SSR(<Iso.Router.Provider url={url}><App/></Iso.Router.Provider>);
|
||||
while(Iso.Fetch.ServerBlocking.length)
|
||||
{
|
||||
@ -237,7 +238,7 @@ FileListen("${url.pathname}", reloadHandler);`;
|
||||
delete r.Promise;
|
||||
seed.push(r);
|
||||
});
|
||||
Iso.Fetch.ServerTouched = new Set();
|
||||
Iso.Fetch.ServerTouched = false;
|
||||
|
||||
const results = Twind.extract(bake, TwindInst);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user