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 {
1010 async configResolved ( config ) {
1111 const certificate = await getCertificate ( ( config . cacheDir ?? defaultCacheDir ) + '/basic-ssl' )
1212 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+ }
1519 }
1620 }
1721}
You can’t perform that action at this time.
0 commit comments