mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 07:08:55 +02:00
feat(nx/forge): reduce size of better-sqlite3
This commit is contained in:
parent
ebb78e4ce5
commit
312288988d
@ -40,15 +40,21 @@ module.exports = {
|
||||
...(process.platform === "darwin" ? [] : extraResourcesForPlatform)
|
||||
],
|
||||
ignore(copyPath) {
|
||||
if (copyPath.startsWith("/dist")) {
|
||||
// Known files that will not be ignored and not logged.
|
||||
if (copyPath.startsWith("/assets") || copyPath.startsWith("/public")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (copyPath.startsWith("/src")) {
|
||||
return true;
|
||||
// Keep only the prebuild, source code and package index.
|
||||
if (copyPath.startsWith("/node_modules/better-sqlite3")) {
|
||||
if (!copyPath.startsWith("/node_modules/better-sqlite3/build")
|
||||
&& copyPath !== "/node_modules/better-sqlite3/package.json"
|
||||
&& !copyPath.startsWith("/node_modules/better-sqlite3/lib")) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
console.log("[FORGE] ASAR: ", copyPath);
|
||||
// console.log("[FORGE] ASAR: ", copyPath);
|
||||
return false;
|
||||
},
|
||||
afterPrune: [
|
||||
|
Loading…
x
Reference in New Issue
Block a user