Skip to content

Commit 26093fd

Browse files
committed
fix: fix copy favicon bug
1 parent 76e42b3 commit 26093fd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/server/renderer.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,10 @@ export default class Renderer extends Model {
612612
fse.copySync(urlJoin(this.appDir, 'static'), this.outputDir)
613613

614614
// Copy favicon.ico
615-
fse.copyFileSync(urlJoin(this.appDir, 'favicon.ico'), urlJoin(this.outputDir, 'favicon.ico'))
615+
const faviconInputPath = urlJoin(this.appDir, 'favicon.ico')
616+
if (fse.existsSync(faviconInputPath)) {
617+
fse.copyFileSync(faviconInputPath, urlJoin(this.outputDir, 'favicon.ico'))
618+
}
616619
}
617620

618621
async clearOutputFolder() {

0 commit comments

Comments
 (0)