From 457d477c2cfe86901e4aa2831e09f8c22025a106 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 28 Apr 2025 12:23:04 +0100 Subject: [PATCH 1/4] Iterate --- modules/opendesk/element-web/vite.config.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/opendesk/element-web/vite.config.ts b/modules/opendesk/element-web/vite.config.ts index 54e9a37ab0..2c13d23d91 100644 --- a/modules/opendesk/element-web/vite.config.ts +++ b/modules/opendesk/element-web/vite.config.ts @@ -28,6 +28,7 @@ export default defineConfig({ rollupOptions: { external: ["react"], }, + minify: false, }, plugins: [ react(), From f7f04242966e1c5a075cb4cfecd84cf110a48b8d Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 28 Apr 2025 12:43:17 +0100 Subject: [PATCH 2/4] Iterate --- modules/opendesk/element-web/package.json | 6 +++--- modules/opendesk/element-web/src/index.ts | 2 +- modules/opendesk/element-web/tests/opendesk.spec.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/opendesk/element-web/package.json b/modules/opendesk/element-web/package.json index 298d4de5c2..e74754c4ce 100644 --- a/modules/opendesk/element-web/package.json +++ b/modules/opendesk/element-web/package.json @@ -18,10 +18,10 @@ "@nordeck/element-web-widget-lifecycle-module": "^1.0.1", "@nordeck/element-web-widget-toggles-module": "^0.1.0", "@types/node": "^22.10.7", - "@types/react": "^18", + "@types/react": "^19", "@vitejs/plugin-react": "^4.3.4", - "react": "^18.0.0", - "react-dom": "^18.0.0", + "react": "^19", + "react-dom": "^19", "rollup-plugin-external-globals": "^0.13.0", "typescript": "^5.7.3", "vite": "^6.0.11", diff --git a/modules/opendesk/element-web/src/index.ts b/modules/opendesk/element-web/src/index.ts index 5c0e746c8d..d88e7f774d 100644 --- a/modules/opendesk/element-web/src/index.ts +++ b/modules/opendesk/element-web/src/index.ts @@ -41,7 +41,7 @@ declare global { } class OpendeskModule implements Module { - public static readonly moduleApiVersion = "^0.1.0"; + public static readonly moduleApiVersion = "^0.1.1"; public constructor(private api: Api) {} diff --git a/modules/opendesk/element-web/tests/opendesk.spec.ts b/modules/opendesk/element-web/tests/opendesk.spec.ts index 6598dad05a..a182535d49 100644 --- a/modules/opendesk/element-web/tests/opendesk.spec.ts +++ b/modules/opendesk/element-web/tests/opendesk.spec.ts @@ -5,7 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial Please see LICENSE files in the repository root for full details. */ -import { type SynapseContainer } from "@element-hq/element-web-playwright-common/lib/testcontainers"; +import { type SynapseContainer } from "@element-hq/element-web-playwright-common/lib/testcontainers/index.js"; import { test, expect } from "../../../../playwright/element-web-test.ts"; From d608e989d06772e02e2add34cb377b941d441614 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 30 Apr 2025 13:07:13 +0100 Subject: [PATCH 3/4] Try with production mode --- modules/opendesk/element-web/vite.config.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/opendesk/element-web/vite.config.ts b/modules/opendesk/element-web/vite.config.ts index 2c13d23d91..6535c4625d 100644 --- a/modules/opendesk/element-web/vite.config.ts +++ b/modules/opendesk/element-web/vite.config.ts @@ -41,6 +41,7 @@ export default defineConfig({ }), ], define: { - process: { env: {} }, + // Use production mode for the build as it is tested against production builds of Element Web + process: { env: { NODE_ENV: "production" } }, }, }); From 796a875024a4ef2ccc30d32921e1d14f23d8efbb Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 30 Apr 2025 13:14:40 +0100 Subject: [PATCH 4/4] Update comment --- modules/opendesk/element-web/vite.config.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/opendesk/element-web/vite.config.ts b/modules/opendesk/element-web/vite.config.ts index 6535c4625d..8f1d83e06f 100644 --- a/modules/opendesk/element-web/vite.config.ts +++ b/modules/opendesk/element-web/vite.config.ts @@ -41,7 +41,8 @@ export default defineConfig({ }), ], define: { - // Use production mode for the build as it is tested against production builds of Element Web + // Use production mode for the build as it is tested against production builds of Element Web, + // this is required for React JSX versions to be compatible. process: { env: { NODE_ENV: "production" } }, }, });