Fix webpack dev server checks

This commit is contained in:
Bill Thornton 2021-10-04 11:31:50 -04:00
parent 3b4ff70709
commit eccd79c4e0
3 changed files with 4 additions and 5 deletions

View file

@ -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 -- WEBPACK_SERVE is replaced by webpack */
if (process.env.WEBPACK_SERVE) {
// 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);