Skip to content

Commit

Permalink
No sense bundling dbus for mac/windows
Browse files Browse the repository at this point in the history
  • Loading branch information
dtcooper committed Aug 10, 2023
1 parent c3ad959 commit 8cbcb06
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion client/scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down Expand Up @@ -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" },
Expand Down

0 comments on commit 8cbcb06

Please sign in to comment.