From 722e0501babd80620fff2903207d2c633f394e15 Mon Sep 17 00:00:00 2001 From: Hugo ATTAL Date: Fri, 9 Dec 2022 19:45:30 +0100 Subject: [PATCH] fix: https object config error (#11) --- src/index.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/index.ts b/src/index.ts index 030e5f7..c9cad38 100644 --- a/src/index.ts +++ b/src/index.ts @@ -9,9 +9,7 @@ function viteBasicSslPlugin(): Plugin { name: 'vite:basic-ssl', async configResolved(config) { const certificate = await getCertificate((config.cacheDir ?? defaultCacheDir) + '/basic-ssl') - const https = () => ({ - https: { cert: certificate, key: certificate } - }) + const https = () => ({ cert: certificate, key: certificate }) config.server.https = Object.assign({}, config.server.https, https()) config.preview.https = Object.assign({}, config.preview.https, https()) } @@ -41,5 +39,5 @@ export async function getCertificate(cacheDir: string) { return content } } - + export default viteBasicSslPlugin