SHA256
Настроить локальный запуск UI с devnet сервером
This commit is contained in:
+10
-3
@@ -39,7 +39,7 @@
|
||||
}());
|
||||
</script>
|
||||
<script>
|
||||
window.__SHINE_BUILD_HASH__ = '20261007235900';
|
||||
window.__SHINE_BUILD_HASH__ = '20261010170500';
|
||||
window.__SHINE_CLIENT_VERSION__ = '1.2.10';
|
||||
</script>
|
||||
<script>
|
||||
@@ -445,11 +445,18 @@ window.__SHINE_BUILD_HASH__ = '20261007235900';
|
||||
}());
|
||||
</script>
|
||||
<script>
|
||||
(function attachAppWithBuildHash() {
|
||||
(async function attachAppWithBuildHash() {
|
||||
const isLocalPreview = ['localhost', '127.0.0.1', '::1'].includes(String(window.location.hostname || '').toLowerCase());
|
||||
if (isLocalPreview && 'serviceWorker' in navigator) {
|
||||
try {
|
||||
const registrations = await navigator.serviceWorker.getRegistrations();
|
||||
await Promise.all(registrations.map((registration) => registration.unregister()));
|
||||
} catch {}
|
||||
}
|
||||
const v = encodeURIComponent(window.__SHINE_BUILD_HASH__ || 'dev');
|
||||
const script = document.createElement('script');
|
||||
script.type = 'module';
|
||||
script.src = `./js/app.js?v=${v}`;
|
||||
script.src = isLocalPreview ? `./js/app.js?v=${v}&local=${Date.now()}` : `./js/app.js?v=${v}`;
|
||||
document.body.appendChild(script);
|
||||
}());
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user