Skip to content

Commit

Permalink
fix: test paths windows
Browse files Browse the repository at this point in the history
  • Loading branch information
lsagetlethias committed Oct 24, 2022
1 parent 482c61f commit 661de98
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions webpack.workers.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,9 @@ module.exports = async (
options: {
replace: `(() => {
const path = require("path");
const IS_PACKAGED = __dirname.indexOf("/resources/workers/") > -1;
throw Error(\`__dirname=\${__dirname} // process.resourcesPath=\${process.resourcesPath} // process.cwd()=\${process.cwd()}\`);
const IS_PACKAGED = __dirname.indexOf(path.join("resources/workers/")) > -1;
return IS_PACKAGED
? path.resolve(process.resourcesPath, "natives/classic-level/")
: path.resolve(process.cwd(), "node_modules/classic-level/");;
return path.resolve(process.cwd(), IS_PACKAGED ? "resources/natives/" : "node_modules/", "classic-level/");
})()`,
search: "__dirname",
},
Expand Down

0 comments on commit 661de98

Please sign in to comment.