sw.js is not part of the sdk yet, so just put the path in index.html
This commit is contained in:
parent
dea7e7b4f5
commit
d9ff4a8484
2 changed files with 2 additions and 5 deletions
|
@ -19,7 +19,7 @@
|
||||||
import {main} from "./main";
|
import {main} from "./main";
|
||||||
import {Platform} from "./Platform";
|
import {Platform} from "./Platform";
|
||||||
import configJSON from "./assets/config.json?raw";
|
import configJSON from "./assets/config.json?raw";
|
||||||
import {olmPaths, downloadSandboxPath, workerPath, serviceWorkerPath} from "./sdk/paths/vite";
|
import {olmPaths, downloadSandboxPath, workerPath} from "./sdk/paths/vite";
|
||||||
const paths = {
|
const paths = {
|
||||||
olm: olmPaths,
|
olm: olmPaths,
|
||||||
downloadSandbox: downloadSandboxPath,
|
downloadSandbox: downloadSandboxPath,
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
...JSON.parse(configJSON)
|
...JSON.parse(configJSON)
|
||||||
};
|
};
|
||||||
if (import.meta.env.PROD) {
|
if (import.meta.env.PROD) {
|
||||||
paths.serviceWorker = serviceWorkerPath;
|
paths.serviceWorker = "sw.js";
|
||||||
}
|
}
|
||||||
const platform = new Platform(
|
const platform = new Platform(
|
||||||
document.body,
|
document.body,
|
||||||
|
|
|
@ -17,6 +17,3 @@ export const olmPaths = {
|
||||||
|
|
||||||
export const downloadSandboxPath = _downloadSandboxPath;
|
export const downloadSandboxPath = _downloadSandboxPath;
|
||||||
export const workerPath = _workerPath;
|
export const workerPath = _workerPath;
|
||||||
// the service worker is generated by the build as an unhashed asset,
|
|
||||||
// we don't use it at development time, so don't use import for the path
|
|
||||||
export const serviceWorkerPath = "sw.js";
|
|
||||||
|
|
Reference in a new issue