Moved image require to service
This commit is contained in:
parent
6aa1bf7ff6
commit
5da6207f8a
2 changed files with 4 additions and 3 deletions
|
@ -5,6 +5,10 @@ import path from "path";
|
|||
import { fileURLToPath } from "url";
|
||||
import { Worker } from "worker_threads";
|
||||
|
||||
// only requiring this to work around an issue regarding worker threads
|
||||
const nodeRequire = createRequire(import.meta.url);
|
||||
nodeRequire(`./build/${process.env.DEBUG && process.env.DEBUG === "true" ? "Debug" : "Release"}/image.node`);
|
||||
|
||||
import ImageConnection from "../imageConnection.js";
|
||||
|
||||
class ImageWorker extends BaseServiceWorker {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue