From 7779205aa15cb3de9cf58a0a7fc1ef887eef99a1 Mon Sep 17 00:00:00 2001 From: Tak Hoffman <781889+Takhoffman@users.noreply.github.com> Date: Fri, 27 Mar 2026 23:39:45 -0500 Subject: [PATCH] Keep matrix SDK external in bundle checks --- src/plugin-sdk/index.bundle.test.ts | 6 ++++++ tsdown.config.ts | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/plugin-sdk/index.bundle.test.ts b/src/plugin-sdk/index.bundle.test.ts index c79abc4b7a0..f364aac1d30 100644 --- a/src/plugin-sdk/index.bundle.test.ts +++ b/src/plugin-sdk/index.bundle.test.ts @@ -26,6 +26,12 @@ describe("plugin-sdk bundled exports", () => { clean: false, config: false, dts: false, + deps: { + // Match the production host build contract: Matrix SDK packages stay + // external so the heavy runtime surface does not fold multiple + // matrix-js-sdk entrypoints into one bundle artifact. + neverBundle: ["@lancedb/lancedb", "@matrix-org/matrix-sdk-crypto-nodejs", "matrix-js-sdk"], + }, // Full plugin-sdk coverage belongs to `pnpm build`, package contract // guardrails, and `subpaths.test.ts`. This file only keeps the expensive // bundler path honest across representative entrypoint families. diff --git a/tsdown.config.ts b/tsdown.config.ts index 0885591c2e5..70e6bf41c40 100644 --- a/tsdown.config.ts +++ b/tsdown.config.ts @@ -155,7 +155,7 @@ export default defineConfig([ // and bundled hooks in one graph so runtime singletons are emitted once. entry: buildUnifiedDistEntries(), deps: { - neverBundle: ["@lancedb/lancedb"], + neverBundle: ["@lancedb/lancedb", "@matrix-org/matrix-sdk-crypto-nodejs", "matrix-js-sdk"], }, }), ]);