Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

setup: exclude better-sqlite3 & sodium-native from rebuild

Abdullah Atta9c158dfa5353
diff --git a/scripts/bootstrap.mjs b/scripts/bootstrap.mjs
index 1a4a66a92..c26a56f6f 100644
--- a/scripts/bootstrap.mjs
+++ b/scripts/bootstrap.mjs
@@ -40,6 +40,11 @@ const scopes = {
};
// packages that we shouldn't run npm rebuild for
const IGNORED_NATIVE_PACKAGES = [
+ // these get built by electron-builder automatically.
+ ...(args.scope === "desktop"
+ ? ["better-sqlite3-multiple-ciphers", "sodium-native"]
+ : []),
+
// optional dependency of pdfjs-dist, we can ignore
// it because it's only needed in non-browser environments
"canvas",
diff --git a/scripts/generate-sources.mjs b/scripts/generate-sources.mjs
index 1edf569d3..00eec089f 100644
--- a/scripts/generate-sources.mjs
+++ b/scripts/generate-sources.mjs
@@ -124,6 +124,7 @@ for (const lockfile of lockfiles) {
execute(
`flatpak-node-generator`,
[
+ lockfile.name === "desktop" ? "--electron-node-headers" : false,
lockfile.ignoreDev ? "--no-devel" : false,
"npm",
lockfile.path,