@@ -17,36 +17,6 @@ import Markdown from 'unplugin-vue-markdown/vite'
17
17
import svgLoader from 'vite-svg-loader'
18
18
import configureMarkdown from './vite.markdown'
19
19
20
- const baseFolder =
21
- env . APPDATA !== undefined && env . APPDATA !== ''
22
- ? `${ env . APPDATA } /ASP.NET/https`
23
- : `${ env . HOME } /.aspnet/https` ;
24
-
25
- const certificateArg = process . argv . map ( arg => arg . match ( / - - n a m e = (?< value > .+ ) / i) ) . filter ( Boolean ) [ 0 ]
26
- const certificateName = certificateArg ? certificateArg ! . groups ! . value : "myapp.client"
27
-
28
- if ( ! certificateName ) {
29
- console . error ( 'Invalid certificate name. Run this script in the context of an npm/yarn script or pass --name=<<app>> explicitly.' )
30
- process . exit ( - 1 )
31
- }
32
-
33
- const certFilePath = path . join ( baseFolder , `${ certificateName } .pem` )
34
- const keyFilePath = path . join ( baseFolder , `${ certificateName } .key` )
35
-
36
- if ( ! fs . existsSync ( certFilePath ) || ! fs . existsSync ( keyFilePath ) ) {
37
- if ( 0 !== child_process . spawnSync ( 'dotnet' , [
38
- 'dev-certs' ,
39
- 'https' ,
40
- '--export-path' ,
41
- certFilePath ,
42
- '--format' ,
43
- 'Pem' ,
44
- '--no-password' ,
45
- ] , { stdio : 'inherit' , } ) . status ) {
46
- throw new Error ( "Could not create certificate." )
47
- }
48
- }
49
-
50
20
const currentDir = path . dirname ( fileURLToPath ( import . meta. url ) )
51
21
52
22
// https://vitejs.dev/config/
@@ -128,12 +98,5 @@ export default defineConfig({
128
98
'@unhead/vue' : path . join ( currentDir , './node_modules/@unhead/vue' ) ,
129
99
'@servicestack/vue' : path . join ( currentDir , './node_modules/@servicestack/vue' ) ,
130
100
}
131
- } ,
132
- server : {
133
- port : 5173 ,
134
- https : {
135
- key : fs . readFileSync ( keyFilePath ) ,
136
- cert : fs . readFileSync ( certFilePath ) ,
137
- }
138
101
}
139
102
} )
0 commit comments