Skip to content

Commit

Permalink
docs: add documentation for preview method
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann committed Sep 22, 2021
1 parent 95fe350 commit c293000
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/vite/src/node/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ import { proxyMiddleware } from './server/middlewares/proxy'
import { printServerUrls } from './logger'
import { resolveHostname } from './utils'

/**
* Starts the Vite server in preview mode, to simulate a production deployment
* @param config the resolve Vite config
* @param serverOptions what host and port to use
*/
export async function preview(
config: ResolvedConfig,
serverOptions: Pick<ServerOptions, 'port' | 'host'>
Expand Down

0 comments on commit c293000

Please sign in to comment.