From f6b2d2cca82f925a56560dd1759bf7e31827caa6 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Fri, 6 Aug 2021 12:34:20 -0700 Subject: [PATCH] Move index.html to a different place --- index.html => public/index.html | 0 scripts/build.mjs | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) rename index.html => public/index.html (100%) diff --git a/index.html b/public/index.html similarity index 100% rename from index.html rename to public/index.html diff --git a/scripts/build.mjs b/scripts/build.mjs index 040d9c69..d0401987 100644 --- a/scripts/build.mjs +++ b/scripts/build.mjs @@ -63,7 +63,7 @@ async function build({modernOnly, overrideImports, overrideCss}) { if (overrideImports) { importOverridesMap = await readImportOverrides(overrideImports); } - const devHtml = await fs.readFile(path.join(projectDir, "index.html"), "utf8"); + const devHtml = await fs.readFile(path.join(projectDir, "public/index.html"), "utf8"); const doc = cheerio.load(devHtml); const themes = []; findThemes(doc, themeName => { @@ -96,7 +96,7 @@ async function build({modernOnly, overrideImports, overrideCss}) { await buildCssBundles(buildCssLegacy, themes, assets, overrideCss); await buildManifest(assets); // all assets have been added, create a hash from all assets name to cache unhashed files like index.html - assets.addToHashForAll("index.html", devHtml); + assets.addToHashForAll("public/index.html", devHtml); let swSource = await fs.readFile(path.join(projectDir, "src/platform/web/service-worker.js"), "utf8"); assets.addToHashForAll("sw.js", swSource);