desktop: fix Unexpected token 'with' on build

This commit is contained in:
Abdullah Atta
2024-04-26 10:30:44 +05:00
parent 25b18a2edd
commit 8ffb49b700

View File

@@ -19,16 +19,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
import path from "path";
import fs, { readFile, writeFile } from "fs/promises";
import { existsSync } from "fs";
import { existsSync, readFileSync } from "fs";
import yargs from "yargs-parser";
import os from "os";
import * as childProcess from "child_process";
import { fileURLToPath } from "url";
import packageJson from "../package.json" with {type: "json"};
const args = yargs(process.argv);
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const packageJson = JSON.parse(
readFileSync(path.join(__dirname, "..", "package.json"), "utf-8")
);
const webAppPath = path.resolve(path.join(__dirname, "..", "..", "web"));