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)

Innei0276b8713f85
diff --git a/.github/workflows/bundle-analyzer.yml b/.github/workflows/bundle-analyzer.yml
index eccf3af52fa..23eb821f34d 100644
--- a/.github/workflows/bundle-analyzer.yml
+++ b/.github/workflows/bundle-analyzer.yml
@@ -57,10 +57,8 @@ jobs:
- name: Build with bundle analyzer
run: bun run build:analyze
env:
- NODE_OPTIONS: --max-old-space-size=6144
- KEY_VAULTS_SECRET: ${{ steps.generate-secret.outputs.secret }}
- S3_PUBLIC_DOMAIN: https://example.com
- APP_URL: https://example.com
+ NODE_OPTIONS: --max-old-space-size=8192
+ KEY_VAULTS_SECRET: ${{ secrets.KEY_VAULTS_SECRET || steps.generate-secret.outputs.secret }}
- name: Prepare analyzer reports
run: |
diff --git a/scripts/prebuild.mts b/scripts/prebuild.mts
index e5d08c4867e..82a1597214d 100644
--- a/scripts/prebuild.mts
+++ b/scripts/prebuild.mts
@@ -4,11 +4,18 @@ import { rm } from 'node:fs/promises';
import path from 'node:path';
const isDesktop = process.env.NEXT_PUBLIC_IS_DESKTOP_APP === '1';
+const isBundleAnalyzer = process.env.ANALYZE === 'true' && process.env.CI === 'true';
dotenv.config();
// 创建需要排除的特性映射
/* 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',