From 92fdbe15df179fe6f1d4015e266b6046ad644319 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 27 Aug 2020 13:24:04 +0200 Subject: [PATCH] pass olm paths to main fn so build can adjust the file paths, and we can prevent olm from loading by not passing them --- index.html | 6 +++++- scripts/build.mjs | 14 +++++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index cdf0ad4f..b09286a0 100644 --- a/index.html +++ b/index.html @@ -18,7 +18,11 @@ ` + + `` + `` + - ``); + ``); removeOrEnableScript(doc("script#service-worker"), offline); const versionScript = doc("script#version"); @@ -338,7 +346,7 @@ async function copyFolder(srcRoot, dstRoot, filter) { if (dirEnt.isDirectory()) { await fs.mkdir(dstPath); Object.assign(assetPaths, await copyFolder(srcPath, dstPath, filter)); - } else if (dirEnt.isFile() && filter(srcPath)) { + } else if ((dirEnt.isFile() || dirEnt.isSymbolicLink()) && (!filter || filter(srcPath))) { const content = await fs.readFile(srcPath); const hashedDstPath = resource(dstPath, content); await fs.writeFile(hashedDstPath, content);