From 52772a3a893acc9cd6f88d134c2112359f9f41d7 Mon Sep 17 00:00:00 2001 From: kwaroran Date: Wed, 8 Nov 2023 17:08:30 +0900 Subject: [PATCH] [fix] workerurl --- src/ts/plugins/embedscript.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ts/plugins/embedscript.ts b/src/ts/plugins/embedscript.ts index abd44255..32aa323d 100644 --- a/src/ts/plugins/embedscript.ts +++ b/src/ts/plugins/embedscript.ts @@ -1,6 +1,6 @@ import { get } from 'svelte/store' import type { ScriptMode } from '../process/scripts' -import myWorkerUrl from './embedworker?worker&url' +import WorkerUrl from './embedworker?worker&url' import { DataBase, type Chat, type character, type Message } from '../storage/database' import { selectedCharID } from '../stores' import { add, cloneDeep } from 'lodash' @@ -8,7 +8,7 @@ import { sleep } from '../util' import { characterFormatUpdate } from '../characters' import { setDatabase } from '../storage/database' -let worker = new Worker(myWorkerUrl, {type: 'module'}) +let worker = new Worker(WorkerUrl, {type: 'module'}) let results:{ id: string, @@ -60,7 +60,7 @@ function runVirtualJS(code:string){ clearInterval(interval) //restart worker worker.terminate() - worker = new Worker(new URL('./worker.ts', import.meta.url), {type: 'module'}) + worker = new Worker(WorkerUrl, {type: 'module'}) reject('timeout') } },10)