diff --git a/apps/desktop/scripts/build.mjs b/apps/desktop/scripts/build.mjs index 19208563e..cba01edfd 100644 --- a/apps/desktop/scripts/build.mjs +++ b/apps/desktop/scripts/build.mjs @@ -331,7 +331,14 @@ for (const entry of sideCarResources) { } fs.cpSync(src, dest, { recursive: true, - filter: (source) => !EXCLUDE_DIRS.has(path.basename(source)), + filter: (source) => { + const base = path.basename(source); + if (EXCLUDE_DIRS.has(base)) return false; + // Top-level `_` dirs are non-content conventions (plugins/_archive, + // worlds/_archive): never loaded at runtime, dead weight in the app. + if (base.startsWith("_") && path.dirname(source) === src) return false; + return true; + }, }); } console.log(" ✓ plugins/prompts/worlds copied (node_modules/dist excluded)"); diff --git a/apps/desktop/scripts/verify-release.mjs b/apps/desktop/scripts/verify-release.mjs index e767b48f2..5cadd3f91 100644 --- a/apps/desktop/scripts/verify-release.mjs +++ b/apps/desktop/scripts/verify-release.mjs @@ -68,7 +68,9 @@ function mustHaveBundledPlugins(resourcesDir) { } const pluginDirs = fs .readdirSync(pluginsDir, { withFileTypes: true }) - .filter((e) => e.isDirectory()); + // `_`-prefixed dirs (plugins/_archive) are excluded from staging; tolerate + // one slipping through an older build rather than failing the release. + .filter((e) => e.isDirectory() && !e.name.startsWith("_")); if (pluginDirs.length === 0) { throw new Error(`No bundled plugins present under ${pluginsDir} `); }