Skip to content

Commit

Permalink
feat(dev): return listener instance for programmatic usage (#278)
Browse files Browse the repository at this point in the history
  • Loading branch information
mandarini authored Nov 20, 2023
1 parent 2104cf8 commit 80566b2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/commands/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ const command = defineCommand({
// Fork nuxt dev process
const devProxy = await _createDevProxy(nuxtOptions, listenOptions)
await _startSubprocess(devProxy, ctx.rawArgs)
return { listener: devProxy?.listener }
} else {
// Directly start nuxt dev
const { createNuxtDevServer } = await import('../utils/dev')
Expand All @@ -85,6 +86,7 @@ const command = defineCommand({
listenOptions,
)
await devServer.init()
return { listener: devServer?.listener }
}
},
})
Expand Down

0 comments on commit 80566b2

Please sign in to comment.