/** Inherits Vite's `import.meta.globEager` result type */ type GlobEagerResult = Record < string , { [ key ] : any ; } > ; const getComponentName = ( path ) => path . substring ( path . lastIndexOf ( '/' ) + 1 , path . lastIndexOf ( '.' ) ) . toLowerCase ( ) ; export const kirbyup = Object . freeze ( { example import ( modules ) { return Object . entries ( modules ) . reduce < Record < string , any > > ( ( accumulator , [ path , component ] ) => { accumulator [ getComponentName ( path ) ] = component . default ; return accumulator ; } , { } ) ; } } ) ;