mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Move serviceworker precaching to production config
This commit is contained in:
parent
066690dd8b
commit
74940b601b
3 changed files with 16 additions and 9 deletions
|
@ -44,6 +44,10 @@ self.addEventListener('notificationclick', function (event) {
|
|||
event.waitUntil(executeAction(action, data, serverId));
|
||||
}, false);
|
||||
|
||||
// this is needed by the webpack Workbox plugin
|
||||
/* eslint-disable-next-line no-restricted-globals,no-undef */
|
||||
precacheAndRoute(self.__WB_MANIFEST);
|
||||
// Do not precache files in development so live reload works as expected
|
||||
/* eslint-disable-next-line no-undef -- NODE_ENV is replaced by webpack */
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
// this is needed by the webpack Workbox plugin
|
||||
/* eslint-disable-next-line no-restricted-globals,no-undef */
|
||||
precacheAndRoute(self.__WB_MANIFEST);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue