From 8cbcb06f78f555dc52b6f3bf3f8d037bc4e2a60c Mon Sep 17 00:00:00 2001 From: David Cooper Date: Wed, 9 Aug 2023 23:20:03 -0400 Subject: [PATCH] No sense bundling dbus for mac/windows --- client/scripts/build.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/client/scripts/build.js b/client/scripts/build.js index ca6fb699..663a5f16 100644 --- a/client/scripts/build.js +++ b/client/scripts/build.js @@ -2,6 +2,7 @@ const axios = require("axios") const { context: esbuildContext, build: esbuild } = require("esbuild") const { version: electronVersion } = require("electron/package.json") const path = require("path") +const process = require("process") const sveltePlugin = require("esbuild-svelte") const sveltePreprocess = require("svelte-preprocess") @@ -70,8 +71,13 @@ const runBuild = async () => { esbuild(options) } } + const mainExternal = ["electron", "svelte-devtools-standalone"] + if (process.platform !== "linux") { + // only used on Linux + mainExternal.push("@homebridge/dbus-native") + } - build("main.js", { bundle: !isDev, format: "cjs", external: ["electron", "svelte-devtools-standalone"] }) + build("main.js", { bundle: !isDev, format: "cjs", external: mainExternal }) build("app.js", { external: ["electron", "./assets/fonts/*"], loader: { ".svg": "text" },