Skip to content

Commit

Permalink
perf: lazy import preview function (#6898)
Browse files Browse the repository at this point in the history
  • Loading branch information
ydcjeff committed Feb 13, 2022
1 parent 62cbe68 commit 2eabcb9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/cli.ts
Expand Up @@ -6,7 +6,6 @@ import type { ServerOptions } from './server'
import type { LogLevel } from './logger'
import { createLogger } from './logger'
import { resolveConfig } from '.'
import { preview } from './preview'

const cli = cac('vite')

Expand Down Expand Up @@ -230,6 +229,7 @@ cli
strictPort?: boolean
} & GlobalCLIOptions
) => {
const { preview } = await import('./preview')
try {
const server = await preview({
root,
Expand Down

0 comments on commit 2eabcb9

Please sign in to comment.