fix: main branch
This commit is contained in:
@ -119,7 +119,7 @@
|
||||
"tailwindcss": "^3.3.3",
|
||||
"tinybench": "^2.5.1",
|
||||
"typescript": "^5.2.2",
|
||||
"vite": "^5.0.12",
|
||||
"vite": "^5.1.5",
|
||||
"vite-plugin-pwa": "^0.17.0",
|
||||
"vite-plugin-version-mark": "^0.0.10",
|
||||
"vitest": "^0.34.6"
|
||||
|
@ -1,14 +1,16 @@
|
||||
import { RelayMetricCache, UserRelaysCache } from "@snort/system";
|
||||
import { SnortSystemDb } from "@snort/system-web";
|
||||
import { WorkerRelayInterface } from "@snort/worker-relay";
|
||||
import WorkerRelayPath from "@snort/worker-relay/dist/worker?worker&url";
|
||||
import WorkerVite from "@snort/worker-relay/src/worker?worker";
|
||||
|
||||
import { EventCacheWorker } from "./EventCacheWorker";
|
||||
import { GiftWrapCache } from "./GiftWrapCache";
|
||||
import { ProfileCacheRelayWorker } from "./ProfileWorkerCache";
|
||||
import { UserFollowsWorker } from "./UserFollowsWorker";
|
||||
|
||||
export const Relay = new WorkerRelayInterface(WorkerRelayPath);
|
||||
export const Relay = new WorkerRelayInterface(
|
||||
import.meta.env.DEV ? new URL("@snort/worker-relay/dist/esm/worker.mjs", import.meta.url) : new WorkerVite()
|
||||
);
|
||||
export async function initRelayWorker() {
|
||||
try {
|
||||
await Relay.init("relay.db");
|
||||
|
@ -55,19 +55,11 @@ export default defineConfig({
|
||||
"Cross-Origin-Embedder-Policy": "require-corp",
|
||||
},
|
||||
},
|
||||
optimizeDeps: {
|
||||
exclude: ["@sqlite.org/sqlite-wasm"],
|
||||
},
|
||||
define: {
|
||||
CONFIG: JSON.stringify(appConfig),
|
||||
global: {}, // needed for custom-event lib
|
||||
},
|
||||
worker: {
|
||||
format: "es",
|
||||
rollupOptions: {
|
||||
output: {
|
||||
format: "module"
|
||||
}
|
||||
}
|
||||
format: "es"
|
||||
},
|
||||
});
|
||||
|
Reference in New Issue
Block a user