forked from mystiq/hydrogen-web
get notification badge icon url through import now we transpile the sw
This commit is contained in:
parent
a4fac68393
commit
23e0d3f2ff
2 changed files with 3 additions and 2 deletions
|
@ -115,7 +115,6 @@ function replaceCacheFilenamesInServiceWorker(swChunk, unhashedFilenames, assets
|
|||
swSource = replaceArrayInSource("UNHASHED_PRECACHED_ASSETS", unhashedPreCachedAssets);
|
||||
swSource = replaceArrayInSource("HASHED_PRECACHED_ASSETS", hashedPreCachedAssets);
|
||||
swSource = replaceArrayInSource("HASHED_CACHED_ON_REQUEST_ASSETS", hashedCachedOnRequestAssets);
|
||||
swSource = replaceStringInSource("NOTIFICATION_BADGE_ICON", assets.find(a => a.name === "icon.png").fileName);
|
||||
return swSource;
|
||||
}
|
||||
|
||||
|
|
|
@ -15,10 +15,12 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
import NOTIFICATION_BADGE_ICON from "./assets/icon.png?url";
|
||||
// replaced by the service worker build plugin
|
||||
const UNHASHED_PRECACHED_ASSETS = [];
|
||||
const HASHED_PRECACHED_ASSETS = [];
|
||||
const HASHED_CACHED_ON_REQUEST_ASSETS = [];
|
||||
const NOTIFICATION_BADGE_ICON = "assets/icon.png";
|
||||
|
||||
const unhashedCacheName = `hydrogen-assets-${HYDROGEN_GLOBAL_HASH}`;
|
||||
const hashedCacheName = `hydrogen-assets`;
|
||||
const mediaThumbnailCacheName = `hydrogen-media-thumbnails-v2`;
|
||||
|
|
Loading…
Reference in a new issue