Skip to content

Commit 722e050

Browse files
authored
fix: https object config error (#11)
1 parent bd75e51 commit 722e050

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/index.ts

+2-4
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ function viteBasicSslPlugin(): Plugin {
99
name: 'vite:basic-ssl',
1010
async configResolved(config) {
1111
const certificate = await getCertificate((config.cacheDir ?? defaultCacheDir) + '/basic-ssl')
12-
const https = () => ({
13-
https: { cert: certificate, key: certificate }
14-
})
12+
const https = () => ({ cert: certificate, key: certificate })
1513
config.server.https = Object.assign({}, config.server.https, https())
1614
config.preview.https = Object.assign({}, config.preview.https, https())
1715
}
@@ -41,5 +39,5 @@ export async function getCertificate(cacheDir: string) {
4139
return content
4240
}
4341
}
44-
42+
4543
export default viteBasicSslPlugin

0 commit comments

Comments
 (0)