Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: --https is invalid in preview #4318

Merged
merged 1 commit into from Jul 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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