From eb6e8865e92174c71fa83e2f0629627197fe711a Mon Sep 17 00:00:00 2001 From: Thomas Weber Date: Wed, 27 Oct 2021 18:45:02 -0500 Subject: [PATCH] Add favicon to standalone build --- src/p4/template.ejs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/p4/template.ejs b/src/p4/template.ejs index c152612..776c24b 100644 --- a/src/p4/template.ejs +++ b/src/p4/template.ejs @@ -6,9 +6,18 @@ <% const {LONG_NAME, WEBSITE} = require('../packager/brand.js'); %> <%= LONG_NAME %> - <% if (!process.env.STANDALONE) { %> - - <% } %> + <% if (process.env.STANDALONE) { %> + <% + const fs = require('fs'); + const path = require('path'); + const faviconPath = path.resolve('static/favicon.ico'); + if (fs.existsSync(faviconPath)) { + %> + + <% } %> + <% } else {%> + + <% }%>