fix(build): 进一步优化打包内存,强制外置超大包,并将 PlaylistCardPage 设为客户端专属避免服务端静态分析
构建并部署 BYW VoiceHub / Preflight 语法与构建检查 (push) Failing after 3m31s
构建并部署 BYW VoiceHub / 镜像构建·预热(与 Preflight 并发:系统/镜像源/Builder 初始化) (push) Successful in 4m52s
构建并部署 BYW VoiceHub / 构建并推送容器镜像 (push) Skipped
构建并部署 BYW VoiceHub / 部署到生产服务器 (push) Skipped

This commit is contained in:
2026-09-13 13:47:19 +08:00
parent 16f0b1f6b5
commit 7034bbaedb
3 changed files with 14 additions and 2 deletions
@@ -143,7 +143,8 @@ let adminInstance = null
const getAdmin = async () => {
if (!import.meta.client) return null
if (adminInstance) return adminInstance
const mod = await import('~/composables/useAdmin')
// @ts-ignore
const mod = await import(/* @vite-ignore */ '~/composables/useAdmin')
adminInstance = mod.useAdmin()
return adminInstance
}
+11
View File
@@ -297,6 +297,17 @@ export default defineNuxtConfig({
wasm: true,
asyncContext: true
},
// 强制把巨型包和 native 包外置,防止 Nitro 打包时撑爆内存 (OOM 137)
externals: {
external: [
'drizzle-orm',
'postgres',
'@neteasecloudmusicapienhanced/api',
'h3',
'lucide-vue-next',
'@pixi/app'
]
},
timing: true,
// 增加请求超时时间
routeRules: {
+1 -1
View File
@@ -1,4 +1,4 @@
const neteaseEnhancedApiPromise = import('@neteasecloudmusicapienhanced/api').then((mod) => {
const neteaseEnhancedApiPromise = import(/* @vite-ignore */ '@neteasecloudmusicapienhanced/api').then((mod) => {
return (mod.default || {}) as Record<string, (params: Record<string, any>) => Promise<any>>
})