Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

🐛 fix(ci): skip backend routes in bundle analyzer build (#10944)

Innei2fc3b4238ad7
diff --git a/scripts/prebuild.mts b/scripts/prebuild.mts
index af9c0efd2a3..32edbb0f0c0 100644
--- a/scripts/prebuild.mts
+++ b/scripts/prebuild.mts
@@ -6,6 +6,7 @@ import path from 'node:path';
import { fileURLToPath } from 'node:url';
const isDesktop = process.env.NEXT_PUBLIC_IS_DESKTOP_APP === '1';
+const isBundleAnalyzer = process.env.ANALYZE === 'true' && process.env.CI === 'true';
if (isDesktop) {
dotenvExpand.expand(dotenv.config({ path: '.env.desktop' }));
@@ -16,6 +17,12 @@ if (isDesktop) {
// 创建需要排除的特性映射
/* eslint-disable sort-keys-fix/sort-keys-fix */
const partialBuildPages = [
+ // no need for bundle analyzer (frontend only)
+ {
+ name: 'backend-routes',
+ disabled: isBundleAnalyzer,
+ paths: ['src/app/(backend)'],
+ ],
// no need for desktop
// {
// name: 'changelog',