Keep the SDK's matrix-js-sdk imports out of the component bundl

This commit is contained in:
Timo K.
2026-10-30 13:54:26 +01:00
parent 35ce907e1f
commit a6764b4e49
2 changed files with 6 additions and 2 deletions
+3 -2
View File
@@ -44,8 +44,9 @@ const TARGETS = [
{
config: "vite-component.config.ts",
what: "the component build",
sources: ["src", "component"],
excluded: ["component/dev"],
// `sdk` too: the build resolves `@element-hq/matrixrtc-sdk` to its source
sources: ["src", "component", "sdk"],
excluded: ["component/dev", "sdk/dev"],
mustBeExternal: [
"react",
"react-dom",
+3
View File
@@ -89,6 +89,7 @@ export default defineConfig(({ mode }) => {
"react-dom",
"react-dom/client",
"matrix-js-sdk",
"matrix-js-sdk/lib/@types/event",
"matrix-js-sdk/lib/browser-index",
"matrix-js-sdk/lib/client",
"matrix-js-sdk/lib/crypto-api",
@@ -99,8 +100,10 @@ export default defineConfig(({ mode }) => {
"matrix-js-sdk/lib/matrixrtc/EncryptionManager",
"matrix-js-sdk/lib/matrixrtc/IKeyTransport",
"matrix-js-sdk/lib/matrixrtc/IMembershipManager",
"matrix-js-sdk/lib/models/event",
"matrix-js-sdk/lib/models/relations-container",
"matrix-js-sdk/lib/models/room",
"matrix-js-sdk/lib/models/room-state",
"matrix-js-sdk/lib/models/typed-event-emitter",
"matrix-js-sdk/lib/randomstring",
"matrix-js-sdk/lib/sync",