mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #3019 from thornbill/enable-multiserver-dev
Enable multiserver in development environments
This commit is contained in:
commit
fad6c83db6
3 changed files with 11 additions and 3 deletions
|
@ -71,6 +71,11 @@ export function getIncludeCorsCredentials() {
|
|||
}
|
||||
|
||||
export function getMultiServer() {
|
||||
// Enable multi-server support when served by webpack
|
||||
if (__WEBPACK_SERVE__) { // eslint-disable-line no-undef
|
||||
return Promise.resolve(true);
|
||||
}
|
||||
|
||||
return getConfig().then(config => {
|
||||
return !!config.multiserver;
|
||||
}).catch(error => {
|
||||
|
|
|
@ -44,9 +44,8 @@ self.addEventListener('notificationclick', function (event) {
|
|||
event.waitUntil(executeAction(action, data, serverId));
|
||||
}, false);
|
||||
|
||||
// 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') {
|
||||
// Do not precache files when running with webpack dev server so live reload works as expected
|
||||
if (!__WEBPACK_SERVE__) { // eslint-disable-line no-undef
|
||||
// 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