Skip to content

Commit

Permalink
fix: --https get ignored in preview (#4318)
Browse files Browse the repository at this point in the history
  • Loading branch information
y1d7ng committed Jul 20, 2021
1 parent 3a97644 commit a870584
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/vite/src/node/cli.ts
Expand Up @@ -211,7 +211,8 @@ cli
logLevel: options.logLevel,
server: {
open: options.open,
strictPort: options.strictPort
strictPort: options.strictPort,
https: options.https
}
},
'serve',
Expand All @@ -222,7 +223,6 @@ cli
cleanOptions(options) as {
host?: string
port?: number
https?: boolean
}
)
} catch (e) {
Expand Down
4 changes: 2 additions & 2 deletions packages/vite/src/node/preview.ts
Expand Up @@ -18,13 +18,13 @@ import { resolveHostname } from './utils'

export async function preview(
config: ResolvedConfig,
serverOptions: { host?: string; port?: number; https?: boolean }
serverOptions: { host?: string; port?: number }
): Promise<void> {
const app = connect() as Connect.Server
const httpServer = await resolveHttpServer(
config.server,
app,
serverOptions.https === false ? undefined : await resolveHttpsConfig(config)
await resolveHttpsConfig(config)
)

// cors
Expand Down

0 comments on commit a870584

Please sign in to comment.