navidrome/ui/bin/update-workbox.sh
Deluan Quintão cbf5e3d51b
fix(ui): PWA not updating properly in new Vite config (#3493)
* fix: pwa not updating. use the custom code we had before

Signed-off-by: Deluan <deluan@navidrome.org>

* fix: docker build

Signed-off-by: Deluan <deluan@navidrome.org>

---------

Signed-off-by: Deluan <deluan@navidrome.org>
2024-11-30 10:33:16 -05:00

16 lines
524 B
Bash
Executable file

#!/usr/bin/env sh
set -e
export WORKBOX_DIR=public/3rdparty/workbox
rm -rf ${WORKBOX_DIR}
workbox copyLibraries build/3rdparty/
mkdir -p ${WORKBOX_DIR}
mv build/3rdparty/workbox-*/workbox-sw.js ${WORKBOX_DIR}
mv build/3rdparty/workbox-*/workbox-core.prod.js ${WORKBOX_DIR}
mv build/3rdparty/workbox-*/workbox-strategies.prod.js ${WORKBOX_DIR}
mv build/3rdparty/workbox-*/workbox-routing.prod.js ${WORKBOX_DIR}
mv build/3rdparty/workbox-*/workbox-navigation-preload.prod.js ${WORKBOX_DIR}
rm -rf build/3rdparty/workbox-*