File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 1- import { mergeRsbuildConfig } from '@rsbuild/core' ;
1+ import { type RsbuildInstance , mergeRsbuildConfig } from '@rsbuild/core' ;
22import type { UserConfig } from '@rspress/shared' ;
33import { PluginDriver } from './PluginDriver' ;
44import { initRsbuild } from './initRsbuild' ;
@@ -10,7 +10,9 @@ interface ServeOptions {
1010}
1111
1212// Serve ssg site in production
13- export async function serve ( options : ServeOptions ) {
13+ export async function serve (
14+ options : ServeOptions ,
15+ ) : Promise < ReturnType < RsbuildInstance [ 'preview' ] > > {
1416 const { config, port : userPort , host : userHost } = options ;
1517 const envPort = process . env . PORT ;
1618 const envHost = process . env . HOST ;
@@ -40,5 +42,5 @@ export async function serve(options: ServeOptions) {
4042 false ,
4143 ) ;
4244
43- await builder . preview ( ) ;
45+ return builder . preview ( ) ;
4446}
You can’t perform that action at this time.
0 commit comments