Move index.html to a different place
This commit is contained in:
parent
177dfd339a
commit
f6b2d2cca8
2 changed files with 2 additions and 2 deletions
|
@ -63,7 +63,7 @@ async function build({modernOnly, overrideImports, overrideCss}) {
|
||||||
if (overrideImports) {
|
if (overrideImports) {
|
||||||
importOverridesMap = await readImportOverrides(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 doc = cheerio.load(devHtml);
|
||||||
const themes = [];
|
const themes = [];
|
||||||
findThemes(doc, themeName => {
|
findThemes(doc, themeName => {
|
||||||
|
@ -96,7 +96,7 @@ async function build({modernOnly, overrideImports, overrideCss}) {
|
||||||
await buildCssBundles(buildCssLegacy, themes, assets, overrideCss);
|
await buildCssBundles(buildCssLegacy, themes, assets, overrideCss);
|
||||||
await buildManifest(assets);
|
await buildManifest(assets);
|
||||||
// all assets have been added, create a hash from all assets name to cache unhashed files like index.html
|
// 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");
|
let swSource = await fs.readFile(path.join(projectDir, "src/platform/web/service-worker.js"), "utf8");
|
||||||
assets.addToHashForAll("sw.js", swSource);
|
assets.addToHashForAll("sw.js", swSource);
|
||||||
|
|
||||||
|
|
Reference in a new issue