sync worker doesn't use require and ESM doesn't allows it
This commit is contained in:
parent
2f17d81802
commit
93ef4dace0
@ -27,9 +27,6 @@ import { SynchronousCryptoWorker } from "./synchronousWorkerNode.js";
|
|||||||
*/
|
*/
|
||||||
export class SynchronousCryptoWorkerFactory implements CryptoWorkerFactory {
|
export class SynchronousCryptoWorkerFactory implements CryptoWorkerFactory {
|
||||||
startWorker(): CryptoWorker {
|
startWorker(): CryptoWorker {
|
||||||
if (typeof require === "undefined") {
|
|
||||||
throw Error("cannot make worker, require(...) not defined");
|
|
||||||
}
|
|
||||||
|
|
||||||
return new SynchronousCryptoWorker();
|
return new SynchronousCryptoWorker();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user