File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import {
1010 addImportsDir ,
1111 extendPages ,
1212 resolveModule ,
13+ useLogger ,
1314} from '@nuxt/kit'
1415import type { NuxtPage , NuxtModule } from '@nuxt/schema'
1516import { joinURL , withoutLeadingSlash , withoutTrailingSlash } from 'ufo'
@@ -296,6 +297,15 @@ const _module: NuxtModule<NuxtStoriesOptions> = defineNuxtModule<NuxtStoriesOpti
296297 } )
297298 }
298299
300+ if ( nuxt . options . dev && mode !== 'frame' ) {
301+ const logger = useLogger ( 'nuxt-stories' )
302+ nuxt . hook ( 'listen' , ( _server , listener ) => {
303+ const base = ( listener . url as string ) . replace ( / \/ $ / , '' )
304+ const storiesUrl = base + ( routeBasePath === '/' ? '' : routeBasePath )
305+ logger . box ( `nuxt-stories\n\n ➜ ${ storiesUrl } ` )
306+ } )
307+ }
308+
299309 // Child route arrays — shared by both shell and frame parents
300310 const shellChildren : NuxtPage [ ] = [ ]
301311 const frameChildren : NuxtPage [ ] = [ ]
You can’t perform that action at this time.
0 commit comments