Skip to content

Commit

Permalink
fix: don't override user config
Browse files Browse the repository at this point in the history
The incoming `inlineConfig` may be frozen and `Object.assign` may fail for `object is not extensible` error.
  • Loading branch information
otakustay committed Feb 23, 2022
1 parent 33f9671 commit dbf1712
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/http.ts
Expand Up @@ -126,7 +126,7 @@ export async function resolveHttpsConfig(
): Promise<HttpsServerOptions | undefined> {
if (!https) return undefined

const httpsOption = isObject(https) ? https : {}
const httpsOption = isObject(https) ? { ...https } : {}

const { ca, cert, key, pfx } = httpsOption
Object.assign(httpsOption, {
Expand Down

0 comments on commit dbf1712

Please sign in to comment.