File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import { wave } from "@wavekit/wave";
33const Logo = wave . li ( ( li ) =>
44 li . a ( { href : "/wavekit" , style : "font-weight: semibold;" } , ( a ) => {
55 a . img ( {
6- src : "/logo.svg" ,
6+ src : "/wavekit/ logo.svg" ,
77 alt : "Wavekit logo" ,
88 height : "48" ,
99 width : "128" ,
Original file line number Diff line number Diff line change @@ -40,10 +40,12 @@ export type WaveKitHooks = {
4040} ;
4141
4242async function createAssetsHandlers ( {
43+ safeBase,
4344 assetsDir,
44- } : { assetsDir : string } ) : Promise <
45- Record < string , RouterTypes . RouteHandlerObject < string > >
46- > {
45+ } : {
46+ safeBase : string ;
47+ assetsDir : string ;
48+ } ) : Promise < Record < string , RouterTypes . RouteHandlerObject < string > > > {
4749 const files = await readdir ( assetsDir , { recursive : true } ) ;
4850 const iterableHandlers = files . map ( ( filePath ) => {
4951 const file = Bun . file ( path . join ( assetsDir , filePath ) ) ;
@@ -55,7 +57,7 @@ async function createAssetsHandlers({
5557 } ) ;
5658 } ,
5759 } ;
58- return [ fileName , handler ] ;
60+ return [ safeBase + fileName , handler ] ;
5961 } ) ;
6062 return Object . fromEntries ( iterableHandlers ) ;
6163}
@@ -127,6 +129,7 @@ export async function createWaveKit({
127129 return [ safeBase + path , contextHandler ] ;
128130 } ) ;
129131 const assetsHandlers = await createAssetsHandlers ( {
132+ safeBase : safeBase ,
130133 assetsDir : publicDir ?? defaultPublicDir ,
131134 } ) ;
132135 const filteredRoutes = Object . fromEntries (
You can’t perform that action at this time.
0 commit comments