diff --git a/src/editor/core/worker/WorkerManager.ts b/src/editor/core/worker/WorkerManager.ts index fc3db2d..efd2ede 100644 --- a/src/editor/core/worker/WorkerManager.ts +++ b/src/editor/core/worker/WorkerManager.ts @@ -1,4 +1,5 @@ import { Draw } from '../draw/Draw' +import WordCountWorker from './works/wordCount?worker' export class WorkerManager { @@ -7,7 +8,7 @@ export class WorkerManager { constructor(draw: Draw) { this.draw = draw - this.wordCountWorker = new Worker(new URL('./works/wordCount.ts', import.meta.url)) + this.wordCountWorker = new WordCountWorker() } public getWordCount(): Promise {