sw.js: per-build stamp — every deploy changes the service worker bytes so browsers update the worker and re-precache current content (manifest identity, index.html)
This commit is contained in:
1 parent
6a6f8b4103
commit
7e1de2f99b
1 file changed
+2
-1
+2
-1
@@ -49,7 +49,8 @@ RUN python3 /app/code/patch_ui_strings.py
|
|||||||
COPY patch_index.py /app/code/patch_index.py
|
COPY patch_index.py /app/code/patch_index.py
|
||||||
RUN python3 /app/code/patch_index.py && \
|
RUN python3 /app/code/patch_index.py && \
|
||||||
sed -i 's|assets/logo.svg|assets/logo.svg?v=3|g' /app/code/librechat/client/dist/assets/index.*.js && \
|
sed -i 's|assets/logo.svg|assets/logo.svg?v=3|g' /app/code/librechat/client/dist/assets/index.*.js && \
|
||||||
rm -f /app/code/librechat/client/dist/assets/index.*.js.gz /app/code/librechat/client/dist/assets/index.*.js.br
|
rm -f /app/code/librechat/client/dist/assets/index.*.js.gz /app/code/librechat/client/dist/assets/index.*.js.br && \
|
||||||
|
echo "// coop-build-$(date +%s)" >> /app/code/librechat/client/dist/sw.js
|
||||||
|
|
||||||
# PWA chrome colors: LibreChat ships a teal theme_color (#009688) in the web
|
# PWA chrome colors: LibreChat ships a teal theme_color (#009688) in the web
|
||||||
# manifest (the bright green bar Firefox PWAs draw across the top) and black
|
# manifest (the bright green bar Firefox PWAs draw across the top) and black
|
||||||
|
|||||||
Reference in new issue
Block a user