From 1ce5d98efe63fc183f585dcab2fb32bcc2ab92bf Mon Sep 17 00:00:00 2001 From: Shijun Sun <30999793+AllForNothing@users.noreply.github.com> Date: Mon, 29 Aug 2022 11:32:41 +0800 Subject: [PATCH] Remove preload for theme css files (#17468) Signed-off-by: AllForNothing Signed-off-by: AllForNothing --- .../scripts/generate-build-timestamp.js | 21 ------------------- src/portal/src/index.html | 2 -- 2 files changed, 23 deletions(-) diff --git a/src/portal/scripts/generate-build-timestamp.js b/src/portal/scripts/generate-build-timestamp.js index db83541a2..7aa494987 100644 --- a/src/portal/scripts/generate-build-timestamp.js +++ b/src/portal/scripts/generate-build-timestamp.js @@ -16,24 +16,3 @@ if (buildTimestampIndex > 0) { data[buildTimestampIndex] = ` buildTimestamp: ${timestamp},`; fs.writeFileSync('src/environments/environment.prod.ts', data.join('\n'), 'utf8'); } - -// modify below lines in src/index.html to add buildTimestamp query string, in case of css cache in different builds -// -// -const indexHtmlData = fs.readFileSync('src/index.html', 'utf8').split('\n'); -let lightIndex = 0; -let darkIndex =0; -indexHtmlData.forEach((item,index) => { - if(item.indexOf('light-theme.css') !== -1) { - lightIndex = index; - } - if(item.indexOf('dark-theme.css') !== -1) { - darkIndex = index; - } -}); - -if (lightIndex > 0 && darkIndex > 0) { - indexHtmlData[lightIndex] = ` `; - indexHtmlData[darkIndex] = ` `; - fs.writeFileSync('src/index.html', indexHtmlData.join('\n'), 'utf8'); -} \ No newline at end of file diff --git a/src/portal/src/index.html b/src/portal/src/index.html index 6f1be5c92..2ab8be61e 100644 --- a/src/portal/src/index.html +++ b/src/portal/src/index.html @@ -6,8 +6,6 @@ - -