how and why did I miss this

This commit is contained in:
Essem 2022-01-29 16:14:27 -06:00
parent 72c3d670d3
commit ef09762fdc
No known key found for this signature in database
GPG Key ID: 7D497397CC3A2A8C
1 changed files with 2 additions and 1 deletions

View File

@ -4,10 +4,11 @@ import fs from "fs";
import path from "path";
import { fileURLToPath } from "url";
import { Worker } from "worker_threads";
import { createRequire } from "module";
// 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`);
nodeRequire(`../../build/${process.env.DEBUG && process.env.DEBUG === "true" ? "Debug" : "Release"}/image.node`);
import ImageConnection from "../imageConnection.js";