add module preloads before deploy to github pages

This commit is contained in:
Dmitry Vasilev
2024-01-08 02:11:46 +08:00
parent 6ccde99e37
commit 494194b7cb
3 changed files with 53 additions and 1 deletions

6
gen_module_preload.sh Executable file
View File

@@ -0,0 +1,6 @@
PRELOADS=""
for f in `find src -name '*.js'`; do
PRELOADS=$PRELOADS"<link rel='modulepreload' href='/$f'>"
done
sed -i.bak "s#.*PRELOADS_PLACEHOLDER.*#$PRELOADS#" index.html