mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-27 16:52:14 +01:00
8ab815ae93
* Unregister non-matching serviceworkers With the addition of the /assets url, users who visited a previous version of the site now may have two active service workers, one with the old scope `/` and one with scope `/assets`. This check for serviceworkers that do not match the current script path and unregisters them. Also included is a small refactor to publicpath.js which was simplified because AssetUrlPrefix is always present now. Also it makes use of the new joinPaths helper too. Fixes: https://github.com/go-gitea/gitea/pull/15823
6 lines
275 B
JavaScript
6 lines
275 B
JavaScript
// This sets up the URL prefix used in webpack's chunk loading.
|
|
// This file must be imported before any lazy-loading is being attempted.
|
|
import {joinPaths} from './utils.js';
|
|
const {AssetUrlPrefix} = window.config;
|
|
|
|
__webpack_public_path__ = joinPaths(AssetUrlPrefix, '/');
|