feat:update web worker import

This commit is contained in:
Hufe921
2022-06-07 22:11:42 +08:00
parent 319467723f
commit 8ae0e47690
+2 -1
View File
@@ -1,4 +1,5 @@
import { Draw } from '../draw/Draw' import { Draw } from '../draw/Draw'
import WordCountWorker from './works/wordCount?worker'
export class WorkerManager { export class WorkerManager {
@@ -7,7 +8,7 @@ export class WorkerManager {
constructor(draw: Draw) { constructor(draw: Draw) {
this.draw = draw this.draw = draw
this.wordCountWorker = new Worker(new URL('./works/wordCount.ts', import.meta.url)) this.wordCountWorker = new WordCountWorker()
} }
public getWordCount(): Promise<number> { public getWordCount(): Promise<number> {