diff --git a/app/components/Admin/PlaylistCardPage.vue b/app/components/Admin/PlaylistCardPage.client.vue similarity index 99% rename from app/components/Admin/PlaylistCardPage.vue rename to app/components/Admin/PlaylistCardPage.client.vue index a889c34..3bc12e3 100644 --- a/app/components/Admin/PlaylistCardPage.vue +++ b/app/components/Admin/PlaylistCardPage.client.vue @@ -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 } diff --git a/nuxt.config.ts b/nuxt.config.ts index 1143455..4f4382c 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -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: { diff --git a/server/api/api-enhanced/netease/[...path].ts b/server/api/api-enhanced/netease/[...path].ts index 6634718..1e42e56 100644 --- a/server/api/api-enhanced/netease/[...path].ts +++ b/server/api/api-enhanced/netease/[...path].ts @@ -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) => Promise> })