mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Fix webpack dev server checks
This commit is contained in:
parent
3b4ff70709
commit
eccd79c4e0
3 changed files with 4 additions and 5 deletions
|
@ -73,7 +73,7 @@ export function getIncludeCorsCredentials() {
|
||||||
export function getMultiServer() {
|
export function getMultiServer() {
|
||||||
return getConfig().then(config => {
|
return getConfig().then(config => {
|
||||||
// Enable multi-server support when served by webpack
|
// Enable multi-server support when served by webpack
|
||||||
if (process.env.WEBPACK_SERVE) { // eslint-disable-line no-undef
|
if (__WEBPACK_SERVE__) { // eslint-disable-line no-undef
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return !!config.multiserver;
|
return !!config.multiserver;
|
||||||
|
|
|
@ -44,9 +44,8 @@ self.addEventListener('notificationclick', function (event) {
|
||||||
event.waitUntil(executeAction(action, data, serverId));
|
event.waitUntil(executeAction(action, data, serverId));
|
||||||
}, false);
|
}, false);
|
||||||
|
|
||||||
// Do not precache files in development so live reload works as expected
|
// Do not precache files when running with webpack dev server so live reload works as expected
|
||||||
/* eslint-disable-next-line no-undef -- WEBPACK_SERVE is replaced by webpack */
|
if (!__WEBPACK_SERVE__) { // eslint-disable-line no-undef
|
||||||
if (process.env.WEBPACK_SERVE) {
|
|
||||||
// this is needed by the webpack Workbox plugin
|
// this is needed by the webpack Workbox plugin
|
||||||
/* eslint-disable-next-line no-restricted-globals,no-undef */
|
/* eslint-disable-next-line no-restricted-globals,no-undef */
|
||||||
precacheAndRoute(self.__WB_MANIFEST);
|
precacheAndRoute(self.__WB_MANIFEST);
|
||||||
|
|
|
@ -26,7 +26,7 @@ module.exports = merge(common, {
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
new DefinePlugin({
|
new DefinePlugin({
|
||||||
'process.env.WEBPACK_SERVE': true
|
__WEBPACK_SERVE__: true
|
||||||
})
|
})
|
||||||
],
|
],
|
||||||
devServer: {
|
devServer: {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue