File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -162,16 +162,17 @@ export class BundleZipGenerator {
162162 path : `usr/www` ,
163163 } ,
164164 ] ;
165- const addFile_DistToUsr = ( filepath : string , alias : string = filepath ) => {
165+ const addFile_DistToUsr = async (
166+ filepath : string ,
167+ alias : string = filepath
168+ ) => {
166169 const path = import . meta. resolve ( `../serve/${ filepath } ` ) ;
167170 let data = null ;
168171 // 如果是远程的
169172 if ( path . startsWith ( "http" ) ) {
170- data = fs . readFileSync ( import . meta . resolve ( `../serve/ ${ filepath } ` ) ) ;
173+ data = await ( await fetch ( path ) ) . text ( ) ;
171174 } else {
172- data = fs . readFileSync (
173- fileURLToPath ( import . meta. resolve ( `../serve/${ filepath } ` ) )
174- ) ;
175+ data = fs . readFileSync ( fileURLToPath ( path ) ) ;
175176 }
176177 entries . push ( {
177178 dir : false ,
You can’t perform that action at this time.
0 commit comments