File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -10,8 +10,12 @@ function viteBasicSslPlugin(): Plugin {
10
10
async configResolved ( config ) {
11
11
const certificate = await getCertificate ( ( config . cacheDir ?? defaultCacheDir ) + '/basic-ssl' )
12
12
const https = ( ) => ( { cert : certificate , key : certificate } )
13
- config . server . https = Object . assign ( { } , config . server . https , https ( ) )
14
- config . preview . https = Object . assign ( { } , config . preview . https , https ( ) )
13
+ if ( config . server . https === undefined || ! ! config . server . https ) {
14
+ config . server . https = Object . assign ( { } , config . server . https , https ( ) )
15
+ }
16
+ if ( config . preview . https === undefined || ! ! config . preview . https ) {
17
+ config . preview . https = Object . assign ( { } , config . preview . https , https ( ) )
18
+ }
15
19
}
16
20
}
17
21
}
You can’t perform that action at this time.
0 commit comments